File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -66,6 +66,13 @@ if(WEVERYTHING)
6666 )
6767endif ()
6868
69+ if (SANITIZE MATCHES address)
70+ # Enables ASan-powered checks in std::vector in libstdc++.
71+ # For sanity, this may be applied for libstdc++ builds, but it is not easy to detect
72+ # what standard library implementation is being used.
73+ add_compile_definitions (_GLIBCXX_SANITIZE_VECTOR )
74+ endif ()
75+
6976# An option to enable assertions in non-Debug build types.
7077# Disabling assertions in Debug build type has no effect (assertions are still enabled).
7178option (ENABLE_ASSERTIONS "Enable NDEBUG based assertions" OFF )
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ set(wabt_library ${binary_dir}/${CMAKE_STATIC_LIBRARY_PREFIX}wabt${CMAKE_STATIC_
1414set (flags -fvisibility=hidden)
1515if (SANITIZE MATCHES address)
1616 # Instrument WABT with ASan - required for container-overflow checks.
17- set (flags "-fsanitize=address ${flags} " )
17+ set (flags "-D_GLIBCXX_SANITIZE_VECTOR - fsanitize=address ${flags} " )
1818endif ()
1919
2020if (CMAKE_GENERATOR MATCHES Ninja)
You can’t perform that action at this time.
0 commit comments