Skip to content

Commit

Permalink
🪤 Non-trapping mode for wasm-smith (#659)
Browse files Browse the repository at this point in the history
* Introduce non-trapping mode for wasm-smith

* Ensure integer division and remainder operations don't trap

* Ensure `store` operations don't trap

* Avoid trapping on float -> int conversion for NaN, and Infinities

* Move notrap.rs under wasm-smith core

* Fixed some bugs with the wasm we were emitting

* Fixed the last few bugs with call_indirect rewrites

Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>

* Clean up unused variables for now

* cargo fmt

* revert validator changes and remove unused import

* fixup comments

Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>

Co-authored-by: Nick Fitzgerald <fitzgen@gmail.com>
  • Loading branch information
itsrainy and fitzgen authored Jul 25, 2022
1 parent ed454cd commit f229c4f
Show file tree
Hide file tree
Showing 3 changed files with 841 additions and 0 deletions.
1 change: 1 addition & 0 deletions crates/wasm-smith/src/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

mod code_builder;
pub(crate) mod encode;
mod notrap;
mod terminate;

use crate::{arbitrary_loop, limited_string, unique_string, Config, DefaultConfig};
Expand Down
Loading

0 comments on commit f229c4f

Please sign in to comment.