mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ubsan: fix tree-wide -Wmaybe-uninitialized false positives
-fsanitize=* options makes GCC less smart than usual and increase number of 'maybe-uninitialized' false-positives. So this patch does two things: * Add -Wno-maybe-uninitialized to CFLAGS_UBSAN which will disable all such warnings for instrumented files. * Remove CONFIG_UBSAN_SANITIZE_ALL from all[yes|mod]config builds. So the all[yes|mod]config build goes without -fsanitize=* and still with -Wmaybe-uninitialized. Signed-off-by: Andrey Ryabinin <[email protected]> Reported-by: Fengguang Wu <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
21b2f44315
commit
dde5cf39d4
2 changed files with 9 additions and 0 deletions
|
|
@ -13,6 +13,11 @@ config UBSAN_SANITIZE_ALL
|
|||
bool "Enable instrumentation for the entire kernel"
|
||||
depends on UBSAN
|
||||
depends on ARCH_HAS_UBSAN_SANITIZE_ALL
|
||||
|
||||
# We build with -Wno-maybe-uninitilzed, but we still want to
|
||||
# use -Wmaybe-uninitilized in allmodconfig builds.
|
||||
# So dependsy bellow used to disable this option in allmodconfig
|
||||
depends on !COMPILE_TEST
|
||||
default y
|
||||
help
|
||||
This option activates instrumentation for the entire kernel.
|
||||
|
|
|
|||
Loading…
Reference in a new issue