[FFmpeg-devel] [PATCH 2/2] configure: Use -fno-sanitize-recover

James Almer jamrial at gmail.com
Thu Jan 16 21:17:23 EET 2025


On 1/16/2025 4:12 PM, Vitaly Buka via ffmpeg-devel wrote:
> UBSAN by default is just prints a mesage and
> moves on. This hides a few UBs in fate-suite.
> 
> Signed-off-by: Vitaly Buka <vitalybuka at google.com>
> ---
>   configure                     | 4 ++--
>   libavcodec/aacenc_pred.c      | 1 +
>   libavcodec/ffv1dec.c          | 1 +
>   libavcodec/ffv1enc_template.c | 1 +
>   libavcodec/get_bits.h         | 1 +
>   libavcodec/indeo3.c           | 2 +-
>   libavcodec/motion_est.c       | 1 +
>   libavcodec/mss2dsp.c          | 1 +
>   libavcodec/opus/dec.c         | 1 +
>   libavcodec/snow.h             | 1 +
>   libavcodec/svq1enc.c          | 1 +
>   libavfilter/vf_curves.c       | 1 +
>   libavfilter/vf_overlay.c      | 1 +
>   libavformat/mov.c             | 1 +
>   libswscale/input.c            | 6 ++++++
>   libswscale/output.c           | 4 ++++
>   libswscale/swscale_unscaled.c | 3 +++
>   17 files changed, 28 insertions(+), 3 deletions(-)
> 
> diff --git a/configure b/configure
> index 3a1e72e1c6..f2b4fd2c62 100755
> --- a/configure
> +++ b/configure
> @@ -4568,7 +4568,7 @@ set >> $logfile
>   test -n "$valgrind" && toolchain="valgrind-memcheck"
>   
>   enabled ossfuzz && ! echo $CFLAGS | grep -q -- "-fsanitize="  && ! echo $CFLAGS | grep -q -- "-fcoverage-mapping" &&{
> -    add_cflags  -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp -fno-omit-frame-pointer
> +    add_cflags  -fsanitize=address,undefined -fsanitize-coverage=trace-pc-guard,trace-cmp -fno-omit-frame-pointer -fno-sanitize-recover=all

Adding this is probably fine, but all the exceptions below to ignore 
issues are not ok.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20250116/5d89f7ea/attachment.sig>


More information about the ffmpeg-devel mailing list