:orphan: .. title:: ASAN .. option:: 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. Direct dependencies =================== \ :option:`ARCH_POSIX ` *(Includes any dependencies from ifs and menus.)* Defaults ======== No defaults. Implicitly defaults to ``n``. Kconfig definition ================== .. highlight:: kconfig At ``subsys/debug/Kconfig:103`` Included via ``Kconfig:8`` → ``Kconfig.zephyr:34`` → ``subsys/Kconfig:17`` Menu path: (Top) → Sub Systems and OS Services → Debugging Options .. parsed-literal:: config ASAN bool "Build with address sanitizer" depends on \ :option:`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.)*