Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Added cargo-fuzz tests for Rlp crate #6145

Closed
wants to merge 19 commits into from

Commits on Jul 25, 2017

  1. Added cargo-fuzz tests for Rlp crate

    Set up some fuzz test harnesses for the UntrustedRlp struct
    and RlpStream's append_raw function.
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    1bb6244 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2ae9599 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5d00521 View commit details
    Browse the repository at this point in the history
  4. Conditional compitlation for nightly builds

    Only attempt to compile fuzz tests using a nightly compiler
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    d059d69 View commit details
    Browse the repository at this point in the history
  5. Wrap fuzz tests with nightly feature

    Wrap the entire source files for fuzz tests in the nightly
    feature. Meaning tests will only be included in compilation
    when using a nightly compiler.
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    e2799de View commit details
    Browse the repository at this point in the history
  6. Minor aesthetic change

    Include entire source in config macro
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    40dc411 View commit details
    Browse the repository at this point in the history
  7. Syntax correction

    Re-checked macro syntax, and changed to match correct syntax.
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    17bd401 View commit details
    Browse the repository at this point in the history
  8. Fixed conditional compilation

    Included `nightly` feature for entire fuzz test files, excluding
    their compilation during stable builds.
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    5373ba4 View commit details
    Browse the repository at this point in the history
  9. Removed useless code from version cases

    Some code setting rustc config lines were unnecessary and removed.
    At the moment, only the `nightly` feature is enabled when running
    fuzz tests with `cargo fuzz run <test>` and a nightly compiler.
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    34fb2bc View commit details
    Browse the repository at this point in the history
  10. UntrustedRlp Fuzz test for lists and data parsing

    For UntrustedRlp to be processed as a list, one needs to prepend
    the data with the byte `0xc-` where `-` is the number of items
    in the list. Currently using the length of the fuzz data stream
    as the number of items in the UntrustedRlp list.
    onicslabs committed Jul 25, 2017
    Configuration menu
    Copy the full SHA
    3766434 View commit details
    Browse the repository at this point in the history

Commits on Jul 27, 2017

  1. Recursive fuzzing over RLPStreams

    Added an algorithm `iter_recursive()` to iterate recursively over
    the entire RLP structure. Also created a tool `gen_untrusted_corpus.rs`
    for generating valid RLP structured data to make the fuzzing process
    more efficient.
    onicslabs committed Jul 27, 2017
    Configuration menu
    Copy the full SHA
    fbc3436 View commit details
    Browse the repository at this point in the history

Commits on Jul 28, 2017

  1. Cleaned up writing corpus file

    Separated writing the RLP stream to its own function, and build
    the file path using PathBuf.
    onicslabs committed Jul 28, 2017
    Configuration menu
    Copy the full SHA
    728e3e1 View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2017

  1. Configuration menu
    Copy the full SHA
    c3d80a8 View commit details
    Browse the repository at this point in the history
  2. Added libFuzzer dict & improved fuzz harness

    libFuzzer uses dictionaries of keywords to mutate/generate new strings.
    I added a six-entry dictionary of sample RLP streams found in the
    Ethereum documentation. Also removed recursive iteration from the fuzz
    test, replacing it with multiple calls to `as_val()` decoding the
    `UntrustedRlp`'s base value as various types. HUGE boost in code
    coverage with only a relatively small cost to executions/second.
    onicslabs committed Aug 3, 2017
    Configuration menu
    Copy the full SHA
    5b84221 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    25b74cd View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    e3151fb View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    3786e22 View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2017

  1. Configuration menu
    Copy the full SHA
    a7f2279 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0d23592 View commit details
    Browse the repository at this point in the history