[FFmpeg-devel] [PATCH] Adding av_abort() : adding custom handlers for abort().
Hendrik Leppkes
h.leppkes at gmail.com
Wed Jul 27 19:01:05 EEST 2022
On Wed, Jul 27, 2022 at 4:03 PM Julien Vary <jvary at genetec.com> wrote:
>
> 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.
>
> Signed-off-by: Julien Vary <jvary at genetec.com>
abort() should generally not be in a reachable part of the code - not
inside any of the libraries anyway, ffmpeg.c is a different topic.
If it is reachable with any input files, and not just present to shut
up compilers, this is a bug and should be addressed to return an error
instead.
Therefore, we should address those cases, and just leave abort as-is
otherwise. Nevermind that av_abort would need to be a public function,
which sounds like a really bad idea.
- Hendrik
More information about the ffmpeg-devel
mailing list