Skip to content

Update fuzzing instructions for libFuzzer/cargo-fuzz #2702

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

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

G8XSU
Copy link
Contributor

@G8XSU G8XSU commented Nov 3, 2023

  • Update fuzzing instructions for libFuzzer/cargo-fuzz
  • This is also helpful for uploading fuzzing artifacts to ClusterFuzz, which can be used for distributed fuzzing.

@codecov-commenter
Copy link

codecov-commenter commented Nov 3, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (9de51f0) 89.06% compared to head (dabe4af) 88.77%.
Report is 145 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2702      +/-   ##
==========================================
- Coverage   89.06%   88.77%   -0.29%     
==========================================
  Files         112      113       +1     
  Lines       87157    89126    +1969     
  Branches    87157    89126    +1969     
==========================================
+ Hits        77629    79126    +1497     
- Misses       7301     7751     +450     
- Partials     2227     2249      +22     

see 51 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

TheBlueMatt
TheBlueMatt previously approved these changes Nov 3, 2023
Copy link
Collaborator

@TheBlueMatt TheBlueMatt left a comment

Choose a reason for hiding this comment

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

Thanks

TheBlueMatt
TheBlueMatt previously approved these changes Nov 5, 2023
fuzz/README.md Outdated
issues locally, and Travis merely acts as a sanity check. Fuzzing is further only effective with
a lot of CPU time, indicating that if crash scenarios are discovered on Travis with its low
runtime constraints, the crash is caused relatively easily.
Typically, Travis CI will run `travis-fuzz.sh` on one of the environments the automated tests are
Copy link
Collaborator

Choose a reason for hiding this comment

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

Lol we dropped travis long ago. Also its not really the longest part of our CI anymore, the test shell script takes about as long as fuzzing. Not that critical to fix, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

lol, I didn't know what travis ci is, i just thought we gave it a nickname.

To run fuzzing using `cargo-fuzz / libFuzzer`, run

```shell
rustup install nightly # Note: libFuzzer requires a nightly version of rust.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is cargo install cargo-fuzz necessary here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes it is, mentioned in setup above.

You typically won't need to run the entire combination of different fuzzing tools. For local execution, `honggfuzz`
should be more than sufficient.
We support multiple fuzzing engines such as `honggfuzz`, `libFuzzer` and `AFL`. You typically won't
need to run the entire suite of different fuzzing tools. For local execution, `honggfuzz`should be
Copy link
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
need to run the entire suite of different fuzzing tools. For local execution, `honggfuzz`should be
need to run the entire suite of different fuzzing tools. For local execution, `honggfuzz` should be

@TheBlueMatt TheBlueMatt merged commit 6e40e5f into lightningdevkit:main Nov 7, 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.

5 participants