Skip to content

Commit

Permalink
CMake: Improve libstdc++ vector checking with asan
Browse files Browse the repository at this point in the history
Signed-off-by: Matthias Kretz <[email protected]>
  • Loading branch information
mattkretz committed Sep 24, 2024
1 parent c08acfd commit 7c03ea9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ if (CMAKE_CXX_COMPILER_ID MATCHES "(Clang|GNU)")
endif ()

if (ADDRESS_SANITIZER)
add_compile_options(-fsanitize=address -fsanitize-address-use-after-scope -fsanitize=leak -fno-omit-frame-pointer -fstack-protector-strong -fstack-clash-protection) # additional flags: -D_GLIBCXX_DEBUG -D_FORTIFY_SOURCE=2
add_compile_options(-fsanitize=address -fsanitize-address-use-after-scope -D_GLIBCXX_SANITIZE_VECTOR=1 -fsanitize=leak -fno-omit-frame-pointer -fstack-protector-strong -fstack-clash-protection) # additional flags: -D_GLIBCXX_DEBUG -D_FORTIFY_SOURCE=2
add_link_options(-fsanitize=address -fsanitize-address-use-after-scope -fsanitize=leak -fno-omit-frame-pointer -fstack-protector-strong -fstack-clash-protection) # additional flags: -D_GLIBCXX_DEBUG -D_FORTIFY_SOURCE=2
message(STATUS "Enable ADDRESS_SANITIZER: ${ADDRESS_SANITIZER}")
elseif (UB_SANITIZER)
Expand Down

0 comments on commit 7c03ea9

Please sign in to comment.