Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use newer version of libFuzzer #4761

Closed
wants to merge 58 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
58 commits
Select commit Hold shift + click to select a range
424d1ac
test in CI
jouho Aug 19, 2024
2afab2c
Merge branch 'main' into move-fuzz-from-make-to-cmake
jouho Aug 19, 2024
4e87522
address CI error
jouho Aug 19, 2024
68cf9a2
use venv path
jouho Aug 19, 2024
cb0c656
mirror compile options from unit tests
jouho Aug 19, 2024
56d1b9f
modify cmake build options
jouho Aug 19, 2024
2563678
resolve merge conflict
jouho Aug 19, 2024
8dfb77f
disable -Wcast-qual when fuzz testing
jouho Aug 20, 2024
c8f48f1
fix libFuzzer path
jouho Aug 20, 2024
5050286
fix path
jouho Aug 20, 2024
3011893
fix path
jouho Aug 20, 2024
1015d0f
fix path
jouho Aug 20, 2024
3148e8a
fix path
jouho Aug 20, 2024
219519e
use absolute path for testing
jouho Aug 20, 2024
67adc10
fuzz with cmake
jouho Aug 22, 2024
fe8ca3a
start fuzzing with existing corpus
jouho Aug 26, 2024
5a38fdf
add LD_LIBRARY paths
jouho Aug 27, 2024
ae440d3
set visibility to default if fuzzing
jouho Aug 27, 2024
a99f12c
apply correct Wno flags
jouho Aug 27, 2024
52a531b
make function format consistent
jouho Aug 28, 2024
2827df1
limit scope of LD_PRELOAD path for cmake
jouho Aug 28, 2024
2d5d8f2
cleanup output
jouho Aug 28, 2024
46650fe
address symbol undefined error
jouho Aug 28, 2024
64942e3
cleanup
jouho Aug 28, 2024
d733dbe
cleanup PR diff
jouho Aug 29, 2024
333359a
remove unused option
jouho Aug 29, 2024
dbb74c2
fix cmake argument
jouho Aug 29, 2024
4ec27ad
fix cmake command
jouho Aug 29, 2024
caa1933
add buildspec for fuzz
jouho Aug 29, 2024
1ff8296
cleanup file diff
jouho Aug 29, 2024
f15f354
remove failing command
jouho Aug 29, 2024
e0477ef
use correct docker img
jouho Aug 29, 2024
629c46e
remove commented out code
jouho Aug 29, 2024
57eb6fd
change to privileged-mode to true
jouho Aug 29, 2024
2f01cd6
use verbose for debugging
jouho Aug 29, 2024
d8ac8d9
debug with script output
jouho Aug 29, 2024
69aec89
reduce thread count
jouho Aug 29, 2024
fb1f750
attempt to run without LD_PRELOAD
jouho Aug 29, 2024
496d133
add breakpoint in buildspec for debugging
jouho Aug 29, 2024
83da568
use single thread for fuzz
jouho Aug 29, 2024
7ed678c
use prlimit
jouho Aug 30, 2024
308b2be
run fuzz without asan and ubsan
jouho Aug 30, 2024
871f0e4
remove debugging options
jouho Aug 30, 2024
b614f45
cleanup
jouho Aug 30, 2024
661e575
inherit compile/link option
jouho Sep 3, 2024
7f75e39
address PR feedbacks
jouho Sep 3, 2024
944dae4
address PR feedback
jouho Sep 4, 2024
54a3b73
address PR feedback
jouho Sep 5, 2024
004081d
remove unused var
jouho Sep 5, 2024
15db3df
add -Wno-unused-result back to compile option
jouho Sep 5, 2024
fb950c6
address PR feedback
jouho Sep 5, 2024
d557973
Merge branch 'main' into move-fuzz-from-make-to-cmake
jouho Sep 5, 2024
ea4df64
address PR feedback
jouho Sep 5, 2024
442668c
reduce fuzz time to 120 to 60 to match current fuzz CI duration
jouho Sep 5, 2024
7a2b7b2
revert script changes
jouho Sep 5, 2024
743f40b
Merge branch 'main' into move-fuzz-from-make-to-cmake
jouho Sep 6, 2024
f06133c
use libfuzzer from clang
jouho Sep 9, 2024
252a65e
Merge branch 'main' into update-libfuzzer
jouho Sep 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,8 @@ if(NO_STACK_PROTECTOR)
endif()

if(S2N_FUZZ_TEST)
target_compile_options(${PROJECT_NAME} PUBLIC -fsanitize-coverage=trace-pc-guard -fsanitize=leak)
target_link_libraries(${PROJECT_NAME} PUBLIC -fsanitize-coverage=trace-pc-guard -fsanitize=leak)
target_compile_options(${PROJECT_NAME} PUBLIC -fsanitize=fuzzer-no-link,leak)
target_link_libraries(${PROJECT_NAME} PUBLIC -fsanitize=fuzzer-no-link,leak)
endif()

if(TSAN)
Expand Down Expand Up @@ -602,10 +602,6 @@ if (BUILD_TESTING)
target_link_libraries(fuzztest PUBLIC ${PROJECT_NAME})

# Set default values for fuzzing if not defined
if(NOT DEFINED LIBFUZZER_LIB)
message(FATAL_ERROR "LIBFUZZER_LIB is not defined. Please set it to the path of your libFuzzer.a.")
endif()

if(NOT DEFINED FUZZ_TIMEOUT_SEC)
set(FUZZ_TIMEOUT_SEC 60)
endif()
Expand Down Expand Up @@ -655,8 +651,7 @@ if (BUILD_TESTING)
)
target_link_libraries(${TEST_NAME} PRIVATE
fuzztest
${LIBFUZZER_LIB} # Manually link old libFuzzer.a
-lstdc++
-fsanitize=fuzzer -lstdc++
)

# Set the output directory for the fuzzing binaries
Expand Down
3 changes: 1 addition & 2 deletions codebuild/spec/buildspec_fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ phases:
- |
cmake . -Bbuild \
-DCMAKE_PREFIX_PATH=$LIBCRYPTO_ROOT \
-DS2N_FUZZ_TEST=on \
-DLIBFUZZER_LIB=/usr/local/libfuzzer/lib/libFuzzer.a
-DS2N_FUZZ_TEST=on
- cmake --build ./build -- -j $(nproc)
post_build:
on-failure: ABORT
Expand Down
Loading