Add the UBSAN_LOCAL_BOUNDS check for Clang build
authorAlexander Popov <alex.popov@linux.com>
Sat, 24 Sep 2022 21:51:25 +0000 (00:51 +0300)
committerAlexander Popov <alex.popov@linux.com>
Sat, 24 Sep 2022 21:51:25 +0000 (00:51 +0300)
commitf958a9d7254b01ceb31e97e0c02ab098312214dc
tree19c8156ef51f35e914fcc6e7ad4880922014a71d
parenta4e54de7ae6c5312e1b99821c666a487067e8e07
Add the UBSAN_LOCAL_BOUNDS check for Clang build

Explanations from the Linux kernel commit 6a6155f664e31c9be43cd:

When the kernel is compiled with Clang, -fsanitize=bounds expands to
-fsanitize=array-bounds and -fsanitize=local-bounds.

Enabling -fsanitize=local-bounds with Clang has the side-effect of
inserting traps.

That's why UBSAN_LOCAL_BOUNDS can enable the 'local-bounds' option
only when UBSAN_TRAP is enabled.
kconfig_hardened_check/__init__.py