diff --git a/CMakeLists.txt b/CMakeLists.txt index b14702427d1..77e76acc1a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -204,8 +204,9 @@ if(NO_STACK_PROTECTOR) endif() if(S2N_FUZZ_TEST) - target_compile_options(${PROJECT_NAME} PUBLIC -fsanitize=fuzzer-no-link,leak) - target_link_libraries(${PROJECT_NAME} PUBLIC -fsanitize=fuzzer-no-link,leak) + target_compile_definitions(${PROJECT_NAME} PUBLIC S2N_FUZZ_TESTING=1) + target_compile_options(${PROJECT_NAME} PUBLIC -fsanitize=fuzzer-no-link,leak,address,undefined) + target_link_libraries(${PROJECT_NAME} PUBLIC -fsanitize=fuzzer-no-link,leak,address,undefined) endif() if(TSAN)