1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 05:17:34 +00:00

Lagom/Fuzzers: Fix FuzzilliJs build and update patch for new Fuzzilli version

-fsanitize=fuzzer was being added to LINKER_FLAGS from Lagom/CMakeLists,
which we don't want with FuzzilliJs as we want to define the functions
it provides ourselves.
This commit is contained in:
Luke 2021-01-23 19:41:44 +00:00 committed by Andreas Kling
parent f37d3f25e6
commit 1c18d1380f
4 changed files with 16 additions and 6 deletions

View file

@ -34,10 +34,11 @@ add_simple_fuzzer(FuzzShell)
add_simple_fuzzer(FuzzTTF)
add_simple_fuzzer(FuzzURL)
if (NOT ENABLE_OSS_FUZZ AND NOT ENABLE_FUZZER_SANITIZER)
if (NOT ENABLE_OSS_FUZZ)
set(CMAKE_EXE_LINKER_FLAGS "${ORIGINAL_CMAKE_EXE_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_SHARED_LINKER_FLAGS "${ORIGINAL_CMAKE_SHARED_LINKER_FLAGS} -fsanitize=address")
set(CMAKE_MODULE_LINKER_FLAGS "${ORIGINAL_CMAKE_MODULE_LINKER_FLAGS} -fsanitize=address")
add_executable(FuzzilliJs FuzzilliJs.cpp)
# FIXME: For some reason, these option overrides are ignored and FuzzilliJs gets treated
# as a regular fuzzer. Once fixed, please remove the "AND NOT ENABLE_FUZZER_SANITIZER" above.
target_compile_options(FuzzilliJs
PRIVATE $<$<C_COMPILER_ID:Clang>:-g -O1 -fsanitize-coverage=trace-pc-guard>
)