avutil/internal: Do not enable CHECKED with DEBUG
authorMichael Niedermayer <michael@niedermayer.cc>
Fri, 7 Apr 2017 11:49:09 +0000 (13:49 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Mon, 10 Apr 2017 23:05:05 +0000 (01:05 +0200)
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@niedermayer.cc>
libavutil/internal.h

index 7780a9a..a2d73e3 100644 (file)
@@ -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>