From 8e9de387e208be77b6ecb808a201587c4093079e Mon Sep 17 00:00:00 2001 From: Alexey Slokva Date: Mon, 23 Oct 2023 11:15:14 -0400 Subject: [PATCH] Add UBSAN to ASAN builds Signed-off-by: Clayton Smith --- cmake/Modules/VolkBuildTypes.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/VolkBuildTypes.cmake b/cmake/Modules/VolkBuildTypes.cmake index a65beae42..7cd93840a 100644 --- a/cmake/Modules/VolkBuildTypes.cmake +++ b/cmake/Modules/VolkBuildTypes.cmake @@ -187,9 +187,9 @@ endif(NOT WIN32) # NOTE: This is not defined on Windows systems. ######################################################################## if(NOT WIN32) - SET(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING + SET(CMAKE_CXX_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING "Flags used by the C++ compiler during Address Sanitized builds." FORCE) - SET(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fno-omit-frame-pointer" CACHE STRING + SET(CMAKE_C_FLAGS_ASAN "-Wall -Wextra -g -O2 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" CACHE STRING "Flags used by the C compiler during Address Sanitized builds." FORCE) MARK_AS_ADVANCED( CMAKE_CXX_FLAGS_ASAN