[FFmpeg-cvslog] avutil/internal: Do not enable CHECKED with DEBUG
Michael Niedermayer
git at videolan.org
Tue Jun 6 01:05:07 EEST 2017
ffmpeg | branch: release/2.8 | Michael Niedermayer <michael at niedermayer.cc> | Fri Apr 7 13:49:09 2017 +0200| [6025edc0c7c6a69f4b0a06485884f512f2f9205e] | committer: Michael Niedermayer
avutil/internal: Do not enable CHECKED with DEBUG
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.
Reviewed-by: wm4
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit a44b3abb4cf922e379fbac55452d0482a8223597)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6025edc0c7c6a69f4b0a06485884f512f2f9205e
---
libavutil/internal.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/libavutil/internal.h b/libavutil/internal.h
index 5a7a29d79a..d84b473665 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 enabled to allow detection of additional integer overflows with ubsan
+//#define CHECKED
#include <limits.h>
#include <stdint.h>
More information about the ffmpeg-cvslog
mailing list