Skip to contentSkip to conversation

ubsan-run-time-undefined-behavior-sanity-checker-fix-5

PATCH New Andrey Ryabinin 1 participant 1 message Dec 31, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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.

---
 scripts/Makefile.ubsan | 1 -
 1 file changed, 1 deletion(-)
scripts/Makefile.ubsan +0 -1
index 0a0b36d..8ab6867 100644
@@ -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