You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Debug with sanitizers (note: -O3 from the Release build type still applies at compile time).
27
27
SET( CMAKE_CXX_FLAGS"${CMAKE_CXX_FLAGS} -g --profiling") # Debugging + profiling support
28
28
add_compile_options(-fsanitize=address) # Uncomment to auto-detect occurences of memory bugs (memory leak, use after free, overflows, ...) - also enable linking below!
29
29
# add_compile_options(-fsanitize=undefined) # Uncomment to auto-detect occurences of undefined behavior - also enable linking below!
message(STATUS"'debug-sanitizers' variant: enabling ASAN and other sanitizers")
114
+
target_link_libraries(GD"-O1") # Some optimization at link time (default is -O0), to make the tests run a bit faster in CI.
115
+
target_link_libraries(GD"-s INITIAL_MEMORY=512MB") # Start with a large heap: ASan needs a lot of memory (256MB quarantine for freed allocations, shadow memory) and growing the memory repeatedly has a cost. Overrides TOTAL_MEMORY set above.
114
116
target_link_libraries(GD"-fsanitize=address") # Uncomment to auto-detect occurences of memory bugs (memory leak, use after free, overflows, ...) - also enable compiling above!
115
117
# target_link_libraries(GD "-fsanitize=undefined") # Uncomment to auto-detect occurences of undefined behavior - also enable compiling above!
116
118
target_link_libraries(GD"-fsanitize=null") # Uncomment to auto-detect occurences of undefined behavior - also enable compiling above!
0 commit comments