ubsan-run-time-undefined-behavior-sanity-checker-fix-5
PATCH 1/1 ubsan-run-time-undefined-behavior-sanity-checker-fix-5
Don't use 'bounds-strict' checker. It's a new checker that showed up in GCC 6. It appeared to cause a lot of false positives in dynamically allocated structs which has array as the last field, e.g:
[ 72.707515] UBSAN: Undefined behaviour in kernel/pid.c:506:23 [ 72.707517] index 2 is out of range for type 'upid [1]'
Anyway, we have KASAN for these kind of bugs, so we won't loose much by disabling bounds-strict.
Signed-off-by Andrey Ryabinin <[email protected]>
--- scripts/Makefile.ubsan | 1 - 1 file changed, 1 deletion(-)
scripts/Makefile.ubsan +0 -1
@@ -6,7 +6,6 @@ ifdef CONFIG_UBSAN CFLAGS_UBSAN += $(call cc-option, -fsanitize=null) CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow) CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds) - CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds-strict) CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size) CFLAGS_UBSAN += $(call cc-option, -fsanitize=returns-nonnull-attribute) CFLAGS_UBSAN += $(call cc-option, -fsanitize=bool)
Signature · 1 line
2.4.10