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

Add support for centipede options file #3398

Merged

Conversation

paulsemel
Copy link
Collaborator

This CL adds support for an .options file for centipede. This allows fuzzing targets to overwrite their own options.

@jonathanmetzman
Copy link
Collaborator

/gcbrun

@paulsemel paulsemel force-pushed the add-support-for-centipede-options branch from 40a6266 to c87a3d1 Compare October 5, 2023 14:18
@paulsemel paulsemel marked this pull request as draft October 5, 2023 14:19
@paulsemel paulsemel marked this pull request as ready for review October 5, 2023 15:20
@paulsemel
Copy link
Collaborator Author

/gcbrun

1 similar comment
@paulsemel
Copy link
Collaborator Author

/gcbrun

@paulsemel paulsemel force-pushed the add-support-for-centipede-options branch 3 times, most recently from 0cfc181 to 3629711 Compare October 6, 2023 08:45
Comment on lines +114 to +113
if key not in arguments:
arguments[key] = val
Copy link
Collaborator

Choose a reason for hiding this comment

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

Consider arguments.setdefault(key, val).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

arguments is not an actual dictionary, it's a custom object that vaguely behaves like one. I first wanted to clean the implementation of it, but that's not the purpose of this CL, so I prefer leaving things like it.

@paulsemel paulsemel force-pushed the add-support-for-centipede-options branch 2 times, most recently from f4abbbe to 71c0360 Compare October 6, 2023 14:58
@paulsemel paulsemel requested a review from letitz October 6, 2023 15:14
src/clusterfuzz/_internal/bot/fuzzers/centipede/engine.py Outdated Show resolved Hide resolved
Comment on lines +66 to +69
'-exit_on_crash=1',
f'-fork_server={_SERVER_COUNT}',
f'-rss_limit_mb={_RSS_LIMIT}',
f'-address_space_limit_mb={_ADDRESS_SPACE_LIMIT}',
Copy link
Collaborator

Choose a reason for hiding this comment

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

Does centipede support arguments of the sort -blah instead of --blah?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep, it supports single and double dash.

@paulsemel paulsemel force-pushed the add-support-for-centipede-options branch from fa85aaf to 5c4469a Compare October 6, 2023 15:42
Copy link
Collaborator

@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

@jonathanmetzman
Copy link
Collaborator

I'll merge this Monday.
@alan32liu Does this look okay to you?

@paulsemel
Copy link
Collaborator Author

ping @jonathanmetzman, can we merge this?

Copy link
Collaborator

@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

@jonathanmetzman jonathanmetzman merged commit 9ca6288 into google:master Oct 11, 2023
7 checks passed
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.

4 participants