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

Build OSS-Fuzz projects with FuzzBench fuzzers. #13126

Open
wants to merge 17 commits into
base: oss_fuzz_on_demand_trigger
Choose a base branch
from

Conversation

decoNR
Copy link
Collaborator

@decoNR decoNR commented Mar 11, 2025

Use fuzzbench.py for building OSS-Fuzz projects with FuzzBench fuzzers.

  • Added a call to fuzzbench.py's get_build_steps function in the oss_fuzz_on_demand.py main function.
  • Changed FUZZ_TARGET environment variable value to an empty string to be able to find binary targets during the build.
  • Added handling of command line arguments.
  • Removed OUT environment variable overwrite on fuzzbench.py to make code more understandable.

Related to b/401215144 .

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 11, 2025

/gcbrun oss_fuzz_on_demand.py libaom hermes zstd --sanitizer coverage --fuzzing-engine libfuzzer

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 11, 2025

/gcbrun oss_fuzz_on_demand.py skcms --sanitizer coverage --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 13, 2025

/gcbrun oss_fuzz_on_demand.py skcms

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --sanitizer coverage --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --sanitizer coverage --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --sanitizer coverage --fuzzing-engine mopt

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --sanitizer coverage --fuzzing-engine mopt

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine mopt

1 similar comment
@decoNR
Copy link
Collaborator Author

decoNR commented Mar 14, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine mopt

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 18, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 18, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 19, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine libafl

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 20, 2025

/gcbrun oss_fuzz_on_demand.py skcms --fuzzing-engine eclipser

@decoNR decoNR changed the title Test the usage of fuzzbench.py in the OSS-Fuzz on Demand project. Build OSS-Fuzz projects with FuzzBench fuzzers. Mar 20, 2025
@decoNR decoNR requested a review from jonathanmetzman March 20, 2025 14:21
@decoNR decoNR marked this pull request as ready for review March 20, 2025 14:22
@jonathanmetzman
Copy link
Contributor

Use fuzzbench.py for building OSS-Fuzz projects with FuzzBench fuzzers.

  • Added a call to fuzzbench.py's get_build_steps function in the oss_fuzz_on_demand.py main function.
  • Changed FUZZ_TARGET environment variable value to an empty string.
  • Added handling of command line arguments.
  • Removed OUT environment variable overwrite on fuzzbench.py.

Related to b/401215144 .

I think this description would be improved if it explained why certain things were done, not just that they were done.

Copy link
Contributor

@jonathanmetzman jonathanmetzman left a comment

Choose a reason for hiding this comment

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

lgtm

@@ -18,9 +18,14 @@
import sys
import logging

import fuzzbench, build_project
Copy link
Contributor

Choose a reason for hiding this comment

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

We do imports on separate lines, per the style guide.

@@ -85,7 +85,8 @@ def exec_command_from_github(pull_request_number, repo, branch):
logging.info('Command: %s.', command)

if command_file == OSS_FUZZ_ON_DEMAND_COMMAND_STR.split(' ')[1]:
return oss_fuzz_on_demand.oss_fuzz_on_demand_main(command)
return True if oss_fuzz_on_demand.oss_fuzz_on_demand_main(
Copy link
Contributor

Choose a reason for hiding this comment

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

Change to oss_fuzz_on_demand.oss_fuzz_on_demand_main( command) == 0

return parser.parse_args()
parser.add_argument('--fuzzing-engine',
required=False,
default='libafl',
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not a good default, it should probably be libfuzzer.

@decoNR
Copy link
Collaborator Author

decoNR commented Mar 28, 2025

/gcbrun oss_fuzz_on_demand.py skcms

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.

2 participants