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

Drop some unsafes - the compiler now optimizes equivalent safe code #43

Merged
merged 18 commits into from
Jun 26, 2018

Commits on Jun 22, 2018

  1. Drop unsafe loops. On Rust 1.27 performance degradation is within mea…

    …surement noise even when taking 10x the normal number of samples using Criterion.
    Shnatsel committed Jun 22, 2018
    Configuration menu
    Copy the full SHA
    1a810db View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2018

  1. Exit earlier on invalid run length, without leaving behind a buffer w…

    …ith potentially uninitialized contents. I have tried and failed to actually exploit this to get an information leak.
    Shnatsel committed Jun 24, 2018
    Configuration menu
    Copy the full SHA
    488db57 View commit details
    Browse the repository at this point in the history
  2. Fix formatting

    Shnatsel committed Jun 24, 2018
    Configuration menu
    Copy the full SHA
    a5e29c8 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bc3916d View commit details
    Browse the repository at this point in the history
  4. Add semicolon

    Shnatsel committed Jun 24, 2018
    Configuration menu
    Copy the full SHA
    3715c4c View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2018

  1. run_len_dist: validate that dist is not 0. Fixes information disclosu…

    …re vulnerability in this function. This is not exploitable in practice, because run_len_dist() is not exposes in the public API and is never called with dist=0 from this crate, even given deliberately malformed inputs.
    Shnatsel committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    11c73f2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    8f22601 View commit details
    Browse the repository at this point in the history
  3. Remove use of 'abort' intrinsic now that panic!() is optimized by the…

    … compiler. Replace its use with more idiomatic assertions.
    Shnatsel committed Jun 25, 2018
    Configuration menu
    Copy the full SHA
    4e5cc94 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    dd20d3e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    d56abee View commit details
    Browse the repository at this point in the history

Commits on Jun 26, 2018

  1. Revert "Remove 'unstable' feature from Cargo.toml"

    This reverts commit dd20d3e.
    Shnatsel committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    61c2c1c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d476136 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    fdee4de View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    9c8f582 View commit details
    Browse the repository at this point in the history
  5. Add an assert for dist correctness right before it's used. Surprising…

    …ly, this actually *improves* performance slightly.
    Shnatsel committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    a2955c8 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    f4418ea View commit details
    Browse the repository at this point in the history
  7. Drop a wall of text in a comment, it is not helpful. There is an asse…

    …rt below for it anyway.
    Shnatsel committed Jun 26, 2018
    Configuration menu
    Copy the full SHA
    baf9c7e View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a36a517 View commit details
    Browse the repository at this point in the history