Commit 4efbc51a authored by Mathis Rosenhauer's avatar Mathis Rosenhauer

CMake: enable ubsan for fuzzing

parent 25084694
...@@ -5,10 +5,11 @@ endif() ...@@ -5,10 +5,11 @@ endif()
add_library(aec_fuzz STATIC ${libaec_SRCS}) add_library(aec_fuzz STATIC ${libaec_SRCS})
add_executable(fuzz_target fuzz_target.cc) add_executable(fuzz_target fuzz_target.cc)
set(FUZZ_TARGET_LINK_FLAGS "-fsanitize=address") set(FUZZ_TARGET_LINK_FLAGS "-fsanitize=address,undefined")
set(FUZZ_TARGET_COMPILE_FLAGS set(FUZZ_TARGET_COMPILE_FLAGS
"-g" "-g"
"-fsanitize=address" "-fsanitize=address,undefined"
"-fno-sanitize-recover=undefined"
"-fsanitize-coverage=trace-pc-guard,indirect-calls,edge") "-fsanitize-coverage=trace-pc-guard,indirect-calls,edge")
set_target_properties(fuzz_target aec_fuzz PROPERTIES set_target_properties(fuzz_target aec_fuzz PROPERTIES
LINK_FLAGS ${FUZZ_TARGET_LINK_FLAGS} LINK_FLAGS ${FUZZ_TARGET_LINK_FLAGS}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment