Add clusterfuzzlite to fuzz in CI

This commit is contained in:
Julian Oes
2022-01-07 10:17:12 -05:00
committed by Daniel Agar
parent 9eda5b373c
commit 2cbc993976
7 changed files with 67 additions and 7 deletions
+7 -1
View File
@@ -157,7 +157,6 @@ function(px4_add_common_flags)
set(cxx_flags)
list(APPEND cxx_flags
-fno-exceptions
-fno-rtti
-fno-threadsafe-statics
-Wreorder
@@ -165,6 +164,13 @@ function(px4_add_common_flags)
# disabled warnings
-Wno-overloaded-virtual # TODO: fix and remove
)
if(NOT CMAKE_BUILD_TYPE STREQUAL FuzzTesting)
list(APPEND cxx_flags
-fno-rtti
)
endif()
foreach(flag ${cxx_flags})
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:${flag}>)
endforeach()
+5 -4
View File
@@ -136,13 +136,14 @@ elseif (CMAKE_BUILD_TYPE STREQUAL FuzzTesting)
add_compile_options(
-g3
-fsanitize=fuzzer,address,undefined
-fsanitize=fuzzer
-DFUZZTESTING
)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=fuzzer,address,undefined" CACHE INTERNAL "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=fuzzer,address,undefined" CACHE INTERNAL "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=fuzzer,address,undefined" CACHE INTERNAL "" FORCE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=fuzzer $ENV{LIB_FUZZING_ENGINE}" CACHE INTERNAL "" FORCE)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -fsanitize=fuzzer $ENV{LIB_FUZZING_ENGINE}" CACHE INTERNAL "" FORCE)
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -fsanitize=fuzzer $ENV{LIB_FUZZING_ENGINE}" CACHE INTERNAL "" FORCE)
function(sanitizer_fail_test_on_error test_name)
# Not sure what to do here