From: khizmax Date: Mon, 27 Feb 2017 07:51:33 +0000 (+0300) Subject: Added UBSan to ASan-instrumented code X-Git-Tag: v2.3.0~150 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4897e626095ad4237dbb91f98d3aaf9419e05238;p=libcds.git Added UBSan to ASan-instrumented code --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 80726f93..4b547e15 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,9 +49,9 @@ endif(WITH_BOOST_ATOMIC) if(WITH_ASAN) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -fPIC -fsanitize=address -g -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O1 -fsanitize=address -g -fno-omit-frame-pointer -fno-optimize-sibling-calls") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address -pie") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O1 -fPIC -fsanitize=address,undefined -g -fno-omit-frame-pointer -fno-optimize-sibling-calls") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O1 -fsanitize=address,undefined -g -fno-omit-frame-pointer -fno-optimize-sibling-calls") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=address,undefined -pie") else() message(WARNING "Compiler does not support AddressSanitizer") endif()