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.
Showing the changes to scripts (1 of 2 files). Show all
Unified · Split
| @@ -3,7 +3,6 @@ ifdef CONFIG_UBSAN · 2 unmodified lines | |||
| 3 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero) | 3 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=integer-divide-by-zero) |
| 4 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable) | 4 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=unreachable) |
| 5 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=vla-bound) | 5 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=vla-bound) |
| 6 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=null) | ||
| 7 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow) | 6 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=signed-integer-overflow) |
| 8 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds) | 7 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=bounds) |
| 9 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size) | 8 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=object-size) |
| @@ -14,4 +13,8 @@ ifdef CONFIG_UBSAN · 4 unmodified lines | |||
| 14 | ifdef CONFIG_UBSAN_ALIGNMENT | 13 | ifdef CONFIG_UBSAN_ALIGNMENT |
| 15 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment) | 14 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=alignment) |
| 16 | endif | 15 | endif |
| 16 | |||
| 17 | ifdef CONFIG_UBSAN_NULL | ||
| 18 | CFLAGS_UBSAN += $(call cc-option, -fsanitize=null) | ||
| 19 | endif | ||
| 17 | endif | 20 | endif |