Commit Graph

15 Commits

Author SHA1 Message Date
manunio
5e8d6e8176 Fix fuzz errors 2022-12-26 20:31:37 +05:30
Syrus Akbary
4384ddf9cd Improved EngineBuilder and Store API
- Store::new() now takes an impl Into<Engine>.
- Added Into<Engine> impls in each of the compilers
- Updated docs/migration_to_3.0.0.md on API usage
2022-07-28 15:20:26 +03:00
Manos Pitsidianakis
214346af3b Merge Backend into EngineBuilder and refactor feature flags 2022-07-27 21:03:24 +03:00
Manos Pitsidianakis
4a06b1d3f6 Rename engine's Universal type to Backend
The Universal type was essentially a builder of engines that's given a
compiler backend and creates an Engine with .engine() method. The name
was not clear.
2022-07-25 13:23:13 +03:00
Syrus Akbary
a419ccdf52 Move Webassembly objects to Store and remove Context
Co-authored-by: ptitSeb <sebastien.chev@gmail.com>
Co-authored-by: Manos Pitsidianakis <manos@wasmer.io>
2022-07-19 15:31:51 +03:00
Manos Pitsidianakis
f744bac1a2 Store: replace new() with new_with_engine() and make new() take CompilerConfig
Since there's one engine now, it doesn't make sense to initialize a
`Store` with the engine specifically. It's an extra redundant step for
the API user.
2022-06-16 16:57:45 +03:00
Manos Pitsidianakis
086205bfcc Remove wasmer_engine_universal{,_artifact} and merge into wasmer_compiler 2022-06-16 16:57:45 +03:00
Ivan Enderlin
e5a784a006 feat: Rename wasmer-engine-jit to wasmer-engine-universal.
This (small) patch renames the `wasmer-engine-jit` crate into
`wasmer-engine-universal`.
2021-05-25 16:12:06 +02:00
Nick Lewycky
a84a4c2319 Use starts_with for errors that always start with this string. 2021-05-07 11:14:50 -07:00
Nick Lewycky
f29d3efdca Generalize these strings, stop chasing changing error messages.
A runtime error encountered during instantiation has to be one of the kinds of errors that can occur during instantiation, out of bounds covers the cases like initializing memory or table entries that don't exist.
2021-05-06 14:09:17 -07:00
Nick Lewycky
b2ad87fd55 Remove impl Default from our WasmSmithModule wrappers.
Manually impl Arbitrary in equivalence jit so that we can apply the termination there. This applies it in one place whether we're in cargo fuzz run or in cargo fuzz fmt.
2021-04-16 15:26:35 -07:00
Nick Lewycky
f0e5f2fdf4 Add the ability to dump the raw wasm bytes controlled by an environment variable.
Ordinarily when the fuzzer fails it will use the wasmprinter to dump the plain text of the wasm as part of the failure. Also you can use `cargo fuzz fmt --features=... fuzzer_name /path/to/artifact` to dump it as text again. In the event that dumping as text fails (either crashes or fails to replicate the problem), you can use the DUMP_TEST_CASE environment variable to get the raw wasm bytes as documented in the readme.
2021-04-16 14:04:56 -07:00
Nick Lewycky
c3f75abdcb Upgrade cargo fmt. Adds support for cargo fuzz fmt command.
Wrap wasm_smith::Module in our own struct that we implement Debug for. Implement debug by printing out the wasm text.

Ignore a table element out of bounds, we're correctly catching and reporting the bug.

Changes to equivalence_jit. Distinguish between running a single function that failed and a failing instantiation. Ignore most types of runtime errors, only look at successful function invocations. When comparing floats, compare the raw bits (otherwise NaN == NaN is false even when the bits are the same).
2021-04-16 14:02:52 -07:00
Nick Lewycky
6925429185 Include fuzz/ in fmt and clippy. 2021-03-19 14:41:43 -07:00
Nick Lewycky
f5fc209e66 Add a fuzz test that instantiates a module with metering. 2021-03-16 14:26:07 -07:00