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

🏗️ Move wasm-smith's non-trapping mode logic to CodeBuilder #769

Merged
merged 28 commits into from Nov 9, 2022

Commits on Oct 27, 2022

  1. Change CodeBuilder functions to emit multiple instructions

    Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
    itsrainy and fitzgen committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    1fd44cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a9fc52e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    0123e51 View commit details
    Browse the repository at this point in the history
  4. Don't generate trapping instructions that haven't been handled yet

    in non-trapping mode
    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    77bc09f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e21bd93 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2fcf98e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9ec356a View commit details
    Browse the repository at this point in the history
  8. rebase

    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    2b24907 View commit details
    Browse the repository at this point in the history
  9. Address review comments

    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    df12a02 View commit details
    Browse the repository at this point in the history
  10. Handle table and element segments in no-trapping mode

    Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
    itsrainy and fitzgen committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    1bd49f4 View commit details
    Browse the repository at this point in the history
  11. Fix smoke test for non-trapping mode

    It was occasionally running into an 'attempt to multiply with overflow'
    for 32-bit memories, so we check the value before casting to avoid that.
    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    c21d147 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    bb29731 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1f82680 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    da9a663 View commit details
    Browse the repository at this point in the history
  15. Use ne rather than eq to check for NaN values. NaN can't be checked

    for using eq, but it is the only value that is not equal to itself,
    so ne will work.
    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    b2a21dd View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    e90582e View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    62c27b3 View commit details
    Browse the repository at this point in the history
  18. Explicitly specify the largest/smallest i64 that can be represented as

    an f64. This is necessary because `i64::MAX as f64` will result in an
    f64 value that is not representable by an i64.
    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    4fda694 View commit details
    Browse the repository at this point in the history
  19. As part of our non-trapping logic for load operations, we emit instru…

    …ctions
    
    that must check if the memory offset plus the size of the type is within the bounds
    of our memory. In order for us to emit this code, that value must fit in a u64.
    In the case where the memory offset is u64::MAX, then our rust code panics in trying
    to generate the wasm due to an attempt to add with overflow. To solve this, I've added
    an upper bound on our memory offsets for load operations while running in non-trapping
    mode.
    itsrainy committed Oct 27, 2022
    Configuration menu
    Copy the full SHA
    d091301 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    a42cabf View commit details
    Browse the repository at this point in the history

Commits on Nov 2, 2022

  1. Configuration menu
    Copy the full SHA
    1b35fdb View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2022

  1. Configuration menu
    Copy the full SHA
    9c9f68b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9dde658 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    eed452c View commit details
    Browse the repository at this point in the history

Commits on Nov 4, 2022

  1. Configuration menu
    Copy the full SHA
    d2df2f8 View commit details
    Browse the repository at this point in the history
  2. Use a ResourceLimiter to prevent libfuzzer from running out of memory.

    This was happening with modules that had a large number of memory.grow
    or table.grow instructions.
    itsrainy committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    7ef8bac View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2022

  1. Clean up code a little bit

    itsrainy committed Nov 7, 2022
    Configuration menu
    Copy the full SHA
    3a761e6 View commit details
    Browse the repository at this point in the history

Commits on Nov 8, 2022

  1. Configuration menu
    Copy the full SHA
    9a1a86f View commit details
    Browse the repository at this point in the history