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

Improve baby_fuzzer chapter of the documentation #1289

Merged
merged 5 commits into from
May 24, 2023

Conversation

kokkonisd
Copy link
Contributor

Restructure the baby_fuzzer chapter to use listings instead of hardcoded snippets, to allow for better maintenance and hiding/showing relevant parts of code, to reveal how new snippets fit in the complete fuzzer.

kokkonisd added 2 commits May 23, 2023 12:50
Specifically:
- Explicitly mention that the dependency path must point to a specific
  directory in the cloned repo (and not the root directory)
- Explicitly mention how to manually trigger the panic in the harness
  for testing purposes
Since the baby fuzzer chapter of the documentation is done in a
"tutorial", step-by-step fashion, it would be nice to be able to see
where exactly new lines have to be placed in the existing code. To that
end, the code used in the tutorial is moved to snippets (as is done in
the Rust Book), as it allows for much more convenient maintenance of the
snippets, as well as easy hiding of the non-important code on any given
snippet.

Furthermore, a few minor fixes are applied; a typo on a comment and a
missing unsafe block.
@domenukk domenukk mentioned this pull request May 23, 2023
@domenukk
Copy link
Member

This looks awesome!

kokkonisd added 3 commits May 24, 2023 10:06
Specifically:
- Remove unnecessary `compile_fail` attribute
- Add `ignore` attribute to the snippets of the complete baby fuzzer. As
  explained in [AFLplusplus#1290], it is expected for the baby fuzzer to return a
  non-0 exit code, so this should not trigger a failure during `mdbook
  test`.
For CLI snippets, the "language" should be set to `console`.
@domenukk
Copy link
Member

Thank you!

@domenukk domenukk merged commit 89876f2 into AFLplusplus:main May 24, 2023
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