Enable the address and behavior sanitizers for C++ component unit tests (#13490)

This commit is contained in:
Adam DeMuri
2026-03-10 23:44:05 -06:00
committed by GitHub
parent d0f37ae694
commit 4df3d3554e
+4
View File
@@ -79,6 +79,10 @@ def create_test_config(config_name: str, includes: list[str]) -> dict:
"-Og", # optimize for debug
"-DUSE_TIME_TIMEZONE", # enable timezone code paths for testing
"-DESPHOME_DEBUG", # enable debug assertions
# Enable the address and undefined behavior sanitizers
"-fsanitize=address",
"-fsanitize=undefined",
"-fno-omit-frame-pointer",
],
"debug_build_flags": [ # only for debug builds
"-g3", # max debug info