Build: Enable std::vector ASAN annotation in libstdc++
By defining _GLIBCXX_SANITIZE_VECTOR when ASAN is enabled `std::vector` operations will be annotated so ASAN can detect invalid accesses. See https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_macros.html
This commit is contained in:
parent
09b0353592
commit
e8adf5d331
|
@ -20,6 +20,7 @@ endif()
|
||||||
if(ASAN)
|
if(ASAN)
|
||||||
target_compile_options(zm-compile-option-interface
|
target_compile_options(zm-compile-option-interface
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
-D_GLIBCXX_SANITIZE_VECTOR=1
|
||||||
-fno-omit-frame-pointer
|
-fno-omit-frame-pointer
|
||||||
-fsanitize=address
|
-fsanitize=address
|
||||||
-fsanitize-recover=address
|
-fsanitize-recover=address
|
||||||
|
|
Loading…
Reference in New Issue