zephyr/arch
Keith Packard 2d64237f44 cmake: Enable undefined behavior sanitizer on all targets
GCC and Clang support the undefined behavior sanitizer in any
configuration, the only restriction is that if you want to get nice
messages printed, then you need the ubsan library routines which are only
present for posix architecture or when using picolibc.

This patch adds three new compiler properties:

 * sanitizer_undefined. Enables the undefined behavior sanitizer.
 * sanitizer_undefined_library. Calls ubsan library routines on fault.
 * sanitizer_undefined_trap. Invokes __builtin_trap() on fault.

Overhead for using the trapping sanitizer is fairly low and should be
considered for use in CI once all of the undefined behavior faults in
Zephyr are fixed.

Signed-off-by: Keith Packard <keithp@keithp.com>
2025-05-02 01:16:18 +02:00
..
arc arch/arc: Remove redundant __cxa_atexit from MWDT stubs 2025-04-16 20:36:27 +02:00
arm kernel: remove kernel/internal/smp.h 2025-04-29 02:42:09 +02:00
arm64 cmake: Enable undefined behavior sanitizer on all targets 2025-05-02 01:16:18 +02:00
common arch: common: Make nocache region loadable 2025-04-21 12:42:19 +02:00
mips arch: mips: Rename _Fault to z_mips_fault 2025-01-28 23:42:06 +01:00
nios2 arch: nios2: Rename _Fault to z_nios2_fault 2025-01-28 23:42:06 +01:00
posix posix arch: Change kconfig menu prompt to be a bit clearer 2025-04-16 20:37:16 +02:00
riscv arch: Unify declaration of text region 2025-04-23 02:15:25 +02:00
sparc Revert "arch: deprecate _current" 2025-01-10 07:49:08 +01:00
x86 kernel: remove kernel/internal/smp.h 2025-04-29 02:42:09 +02:00
xtensa xtensa: userspace: use ADDX4 to calculate syscall table index 2025-04-17 00:57:19 +02:00
archs.yml
CMakeLists.txt
Kconfig cmake: Enable undefined behavior sanitizer on all targets 2025-05-02 01:16:18 +02:00