-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add OSS-Fuzz on Demand build steps to extract crashes from the fuzzing output corpus #13270
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
base: master
Are you sure you want to change the base?
Conversation
…latest libfuzzer build
/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer |
/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer |
/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer |
/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer |
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.
lgtm
/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer |
@@ -24,8 +24,16 @@ | |||
import build_lib | |||
import build_project | |||
|
|||
infra_dir = os.path.dirname( |
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.
Let's make this capital letters.
def get_latest_libfuzzer_build(project_name): | ||
"""Returns the latest LibFuzzer build gsutil URI and the build file name.""" | ||
# Mandatory environment variables required to obtain the latest build name | ||
os.environ['CIFUZZ_TEST'] = 'non_falsy_str' |
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.
Just do 1 or True.
config = config_utils.RunFuzzersConfig() | ||
deployment = clusterfuzz_deployment.OSSFuzz(config, None) | ||
latest_build_filename = deployment.get_latest_build_name() | ||
build_uri = f'gs://clusterfuzz-builds/{project_name}/' + latest_build_filename |
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.
Just use f-string instead of +
Add build steps to download the latest LibFuzzer build and use it to extract crashes from the fuzzing output corpus.
ood.Dockerfile
to be able to copy the fuzzing output corpus directory toOOD_OUTPUT_CORPUS_DIR
.cifuzz
code to get the latest LibFuzzer build filename.fuzzbench.py
maintainability by addingGCB_WORKSPACE_DIR
constant.Related to b/401215144 .