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

Enable keep/reject inputs from the corpus #97

Merged
merged 4 commits into from Oct 18, 2022
Merged

Commits on Oct 1, 2022

  1. Enable keep/reject inputs from the corpus

    This allows the fuzz target to indiciate whether an input was useful
    for the fuzz testing by returning Corpus::Keep or Corpus::Reject.
    Backwards compatibility is preserved by coercing the unit type () to
    Corpus::Keep.
    
    This maps to 0 (Keep) and -1 (Reject) in the libFuzzer API:
    https://llvm.org/docs/LibFuzzer.html#rejecting-unwanted-inputs
    dacut committed Oct 1, 2022
    Copy the full SHA
    dfe756f View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2022

  1. Add changes suggested from code review.

    Docs: make it explicit that we're ignoring the return value of the
    function under test. Add comments from libfuzzer explaining why one
    might want to keep inputs out of the corpus.
    
    Convert From<Corpus> to i32 to a pub fn to_libfuzzer_code() that is
    impl on Corpus to avoid accidental conversion.
    dacut committed Oct 17, 2022
    Copy the full SHA
    028f4e1 View commit details
    Browse the repository at this point in the history
  2. Fix missing return branch.

    Fix doc tests.
    dacut committed Oct 17, 2022
    Copy the full SHA
    7ae224a View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2022

  1. Remove trailing whitespace

    fitzgen committed Oct 18, 2022
    Copy the full SHA
    1a0499e View commit details
    Browse the repository at this point in the history