History

ubsan: allow to disable the null sanitizer

Some architectures use a hardware defined structure at address zero. Checking for a null pointer will result in many ubsan reports. Allow users to disable the null sanitizer.

Christian Borntraeger committed 10 years ago

Commit 725c4d21 parent f2961902 files · +15 −1Browse files

Showing the changes to scripts (1 of 2 files). Show all

Unified · Split

scripts/Makefile.ubsan+4−1
@@ -3,7 +3,6 @@ ifdef CONFIG_UBSAN · 2 unmodified lines
33 CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero)
44 CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable)
55 CFLAGS_UBSAN += $(call cc-option, -fsanitize=vla-bound)
6− CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
76 CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow)
87 CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds)
98 CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size)
@@ -14,4 +13,8 @@ ifdef CONFIG_UBSAN · 4 unmodified lines
1413 ifdef CONFIG_UBSAN_ALIGNMENT
1514 CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment)
1615 endif
16+
17+ifdef CONFIG_UBSAN_NULL
18+ CFLAGS_UBSAN += $(call cc-option, -fsanitize=null)
19+endif
1720 endif