CONFIG_ASAN
Build with address sanitizer
Type: bool
Help
Builds Zephyr with Address Sanitizer enabled. This is currently
only supported by boards based on the posix architecture, and requires a
recent-ish compiler with the ``-fsanitize=address`` command line option,
and the libasan library.
Note that at exit leak detection is disabled for 64-bit boards when
GCC is used due to potential risk of a deadlock in libasan.
This behavior can be changes by adding leak_check_at_exit=1 to the
environment variable ASAN_OPTIONS.
Defaults
No defaults. Implicitly defaults to n
.
Kconfig definition
At <Zephyr>/subsys/debug/Kconfig:97
Included via <Zephyr>/Kconfig:8
→ <Zephyr>/Kconfig.zephyr:44
→ <Zephyr>/subsys/Kconfig:17
Menu path: (Top) → Sub Systems and OS Services → Debugging Options
config ASAN
bool "Build with address sanitizer"
depends on ARCH_POSIX
help
Builds Zephyr with Address Sanitizer enabled. This is currently
only supported by boards based on the posix architecture, and requires a
recent-ish compiler with the ``-fsanitize=address`` command line option,
and the libasan library.
Note that at exit leak detection is disabled for 64-bit boards when
GCC is used due to potential risk of a deadlock in libasan.
This behavior can be changes by adding leak_check_at_exit=1 to the
environment variable ASAN_OPTIONS.
(The ‘depends on’ condition includes propagated dependencies from ifs and menus.)