[FFmpeg-devel] [PATCH] Adding av_abort() : adding custom handlers for abort().

Nicolas George george at nsup.org
Wed Jul 27 18:28:43 EEST 2022


Julien Vary (12022-07-27):
> Replaced all abort() by av_abort() in the code.
> On production systems, when dealing with malformed data,
> avcodec was sometime aborting, with no core/memory dump
> available to troubleshoot after-the-fact.
> Adding av_abort_set_callback to register a custom
> function (instead of the default straight abort()
> behavior), to allow dumping before the actual abort().
> Also 'av_logging' the av_abort() location.

I think it is a very bad idea. The point of abort() is that it is
immediate, so that backtraces are clean and bugs cannot be compounded by
further processing.

A program that terminates on abort() does leave a core dump, I just
checked.

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20220727/af7a5256/attachment.sig>


More information about the ffmpeg-devel mailing list