mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-07 01:06:54 +08:00
Add source tracking for uninit memory sanitizer
This commit is contained in:
parent
ac7af60d76
commit
21500a1dcc
@ -54,8 +54,8 @@ if(CMAKE_COMPILER_IS_GNUCC OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
|||||||
|
|
||||||
option(ENABLE_MEMORY_SANITIZER "Enable memory sanitizer testing in gcc/clang" FALSE)
|
option(ENABLE_MEMORY_SANITIZER "Enable memory sanitizer testing in gcc/clang" FALSE)
|
||||||
if(ENABLE_MEMORY_SANITIZER)
|
if(ENABLE_MEMORY_SANITIZER)
|
||||||
add_definitions(-fsanitize=memory -g)
|
add_definitions(-fsanitize=memory -fsanitize-memory-track-origins -g)
|
||||||
set(LINKER_FLAGS "${LINKER_FLAGS} -fsanitize=memory")
|
set(LINKER_FLAGS "${LINKER_FLAGS} -fsanitize=memory -fsanitize-memory-track-origins ")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_UNDEFINED_SANITIZER "Enable undefined behavior sanitizer testing in gcc/clang" FALSE)
|
option(ENABLE_UNDEFINED_SANITIZER "Enable undefined behavior sanitizer testing in gcc/clang" FALSE)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user