Skip to content

Conversation

zi0Black
Copy link
Contributor

@zi0Black zi0Black commented Dec 21, 2024

  • Added example_init to demonstrate the use of initialization code with the fuzz_target! macro.
  • Updated fuzz_target! macro to support an init parameter for executing initialization code before fuzzing.
  • Updated CI script to build and run the new example.

Should I update any doc with init usage example?

Is the example good enough? Maybe an example using static would be more meaningful.

Close after merge:

- Added `example_init` to demonstrate the use of initialization code with the `fuzz_target!` macro.
- Updated `fuzz_target!` macro to support an `init` parameter for executing initialization code before fuzzing.
- Updated CI script to build and run the new example.
Copy link

@hanna-kruppe hanna-kruppe left a comment

Choose a reason for hiding this comment

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

Thanks for doing this before I got around to it! Some questions/suggestions I had while skimming the diff. I'm not a maintainer, so this doesn't carry any weight one way or another, but I hope they're still useful.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Nice! Looks good to me with nitpick below addressed.

Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good modulo one final suggestion for the doc comment example

Co-authored-by: Nick Fitzgerald <[email protected]>
Copy link
Member

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@zi0Black
Copy link
Contributor Author

Rust fmt is my nemesis :(

@fitzgen fitzgen merged commit bc6ea8b into rust-fuzz:main Jan 24, 2025
2 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.

3 participants