:orphan: .. title:: CONFIG_ASAN .. kconfig:: CONFIG_ASAN CONFIG_ASAN ########### *Build with address sanitizer* Type: ``bool`` Help ==== .. code-block:: none 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 =================== \ :kconfig:`ARCH_POSIX ` *(Includes any dependencies from ifs and menus.)* Defaults ======== No defaults. Implicitly defaults to ``n``. Kconfig definition ================== At ``/debug/Kconfig:97`` Included via ``Kconfig:8`` → ``Kconfig.zephyr:44`` → ``/Kconfig:17`` Menu path: (Top) → Sub Systems and OS Services → Debugging Options .. code-block:: kconfig 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.)*