-
Notifications
You must be signed in to change notification settings - Fork 36.5k
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
wip: Split fuzz binary (take 2) #30882
base: master
Are you sure you want to change the base?
Conversation
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
target_compile_definitions(test_fuzz PRIVATE PROVIDE_FUZZ_MAIN_FUNCTION) | ||
if(BUILD_INDIVIDUAL_FUZZ_BINARIES) | ||
# bash command produces list of harnesses: <harness name> <source file> | ||
execute_process( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to produce an introspector report using this branch: https://github.com/dergoegge/oss-fuzz/tree/2024-09-bitcoin-introspector |
66c288a
to
d527100
Compare
🚧 At least one of the CI tasks failed. HintsMake sure to run all tests locally, according to the documentation. The failure may happen due to a number of reasons, for example:
Leave a comment here, if you need help tracking down a confusing failure. |
d527100
to
9aca33e
Compare
9aca33e
to
0cb1f4c
Compare
🐙 This pull request conflicts with the target branch and needs rebase. |
Closes #28971
In addition to the benefits listed in #28971, this should also enable us to use https://github.com/ossf/fuzz-introspector provided by oss-fuzz. Our current runtime harness selection blocks introspector's static analysis from working properly (e.g. it can't statically determine which functions are reachable by a given harness).
This PR uses the approach suggested here: #29010 (comment). The list of available harnesses is determined (prior to compiling) by grepping for harness names in
FUZZ_TARGET
invocations. When compiling with-DBUILD_INDIVIDUAL_FUZZ_BINARIES=ON
, individual binaries for each harness are produced that no longer include the runtime lookup via theFUZZ
environment variable.build_fuzz/src/test/fuzz
will contain the individual binaries, which are prefixed withfuzz_*
.I'm opening this now to get some early feedback, there are still a few things to address:
-DBUILD_INDIVIDUAL_FUZZ_BINARIES
in the docs