[FFmpeg-devel] [PATCH] avutil/internal: Do not enable CHECKED with DEBUG
wm4
nfxjfg at googlemail.com
Fri Apr 7 16:23:30 EEST 2017
On Fri, 7 Apr 2017 13:49:09 +0200
Michael Niedermayer <michael at niedermayer.cc> wrote:
> This avoids potential undefined behavior in debug mode while still allowing
> developers which want to check for potential additional overflows to do so
> by manually enabling this.
>
> Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavutil/internal.h | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/libavutil/internal.h b/libavutil/internal.h
> index 7780a9a791..70ae37f859 100644
> --- a/libavutil/internal.h
> +++ b/libavutil/internal.h
> @@ -30,9 +30,8 @@
> # define NDEBUG
> #endif
>
> -#if defined(DEBUG) && !defined(CHECKED)
> -# define CHECKED
> -#endif
> +// This can be enabld to allow detection of additional integer overflows with ubsan
> +//#define CHECKED
>
> #include <limits.h>
> #include <stdint.h>
I think the SUINT stuff should be removed completely, but for now I
think this patch improves the situation, so LGTM.
More information about the ffmpeg-devel
mailing list