Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Open
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

decoNR
Copy link
Collaborator

@decoNR decoNR commented Apr 30, 2025

Add build steps to download the latest LibFuzzer build and use it to extract crashes from the fuzzing output corpus.

  • Increment ood.Dockerfile to be able to copy the fuzzing output corpus directory to OOD_OUTPUT_CORPUS_DIR.
  • Use cifuzz code to get the latest LibFuzzer build filename.
  • Add a build step to download the latest LibFuzzer build from GCS.
  • Add a build step to use the latest LibFuzzer target to extract crashes from the OOD fuzzing output corpus.
  • Improve fuzzbench.py maintainability by adding GCB_WORKSPACE_DIR constant.

Related to b/401215144 .

@decoNR
Copy link
Collaborator Author

decoNR commented Apr 30, 2025

/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer

@decoNR
Copy link
Collaborator Author

decoNR commented May 2, 2025

/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer

@decoNR
Copy link
Collaborator Author

decoNR commented May 5, 2025

/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer

@decoNR
Copy link
Collaborator Author

decoNR commented May 6, 2025

/gcbrun oss_fuzz_on_demand.py libucl --fuzzing-engine mopt --fuzz-target ucl_add_string_fuzzer

Copy link

@javanlacerda javanlacerda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@decoNR
Copy link
Collaborator Author

decoNR commented May 7, 2025

/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(
Copy link
Contributor

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'
Copy link
Contributor

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
Copy link
Contributor

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 +

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants