80 Commits

Author SHA1 Message Date
e54b964f02 Fix fuzz build (#3740)
* Fix fuzz build

* Remove unused import

* Applied cargo fmt
2023-04-04 17:58:17 +02:00
5e8d6e8176 Fix fuzz errors 2022-12-26 20:31:37 +05:30
dce55432e6 Merge pull request #3052 from john-sharratt/master
Fixed a memory corruption issue with JS memory operations that were r…
2022-08-04 13:44:39 +02:00
83a97f5533 cli: add create-obj command
lib/compiler: read static object
2022-08-03 10:37:45 +03:00
5aa356f222 Fixed a memory corruption issue with JS memory operations that were reusing invalid views 2022-07-31 20:31:41 +10:00
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
214346af3b Merge Backend into EngineBuilder and refactor feature flags 2022-07-27 21:03:24 +03:00
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
51be5d0860 Rename UniversalEngine to Engine 2022-07-25 13:21:41 +03:00
987a90c0dc Remove Engine trait 2022-07-25 13:19:32 +03:00
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
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
086205bfcc Remove wasmer_engine_universal{,_artifact} and merge into wasmer_compiler 2022-06-16 16:57:45 +03:00
e9d54e130c Remove engine-dylib 2022-06-16 16:57:45 +03:00
683c3688d4 Update spec test workaround for singlepass
This is necessary for singlepass which doesn't support multi-value yet.
2022-04-06 20:48:43 +01:00
dd8fd6db9f Fix fuzz target 2021-11-22 17:45:50 +00:00
4e46c80c48 fuzz: add a test for for deterministic compilation 2021-11-22 15:49:13 +00:00
ba22eca815 doc(readme) Improve the README.md for our fuzz testing framework.
This patch introduces Fuzz Testing, adds links, fix typos etc.
2021-06-01 10:22:38 +02:00
3d66a2e360 feat: Rename wasmer-engine-native to wasmer-engine-dylib. 2021-05-28 14:13:24 +02:00
79d5f20301 feat: Rename wasmer-engine-native to wasmer-engine-shared-object. 2021-05-28 14:13:24 +02:00
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
2e90db6967 Addressed comments 2021-05-18 14:32:21 -07:00
58b18189da Updated dependencies 2021-05-14 15:47:03 -07:00
9e04e2624b Update cranelift, impl low hanging fruit SIMD opcodes 2021-05-12 09:15:56 -07:00
fac052bab8 Addded Cargo.lock fuzz changes 2021-05-11 13:47:17 -07:00
a84a4c2319 Use starts_with for errors that always start with this string. 2021-05-07 11:14:50 -07:00
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
d9d09aba6e Type check tables when importing 2021-05-04 12:16:53 -07:00
41561a45d8 Move back to object 0.23.
There's nothing wrong with 0.24 but we have a dependency on 0.23 through 'backtrace' which is used by wasmer-engine, and we'd like to only have one copy.
2021-05-03 17:03:30 -07:00
32a56fa675 Update cargo.lock files. 2021-05-03 16:42:46 -07:00
fd22404a5e Update cargo.locks.
Update fuzz/Cargo.toml. For wasm-smith the 'master' git branch was renamed to 'main. Switch to a versioned release since it contains the fixes we need.
2021-05-03 16:32:52 -07:00
8012f3f2fd Merge #2250
2250: Use rkyv for JIT Engine r=syrusakbary a=syrusakbary

Since we are going to switch serialization methods, the new one doesn’t have a slowdown if we read the data directly.

Thus, we can always operate with processed frame infos rather than creating a lazy structure that will be deserialized when needed.

Try it:

```shell
git clone https://github.com/wasmerio/wasmer.git -b universal-compiled-info
cd wasmer
make build-wasmer
./target/release/wasmer run lib/c-api/tests/assets/qjs.wasm --disable-cache -- -h
```

Co-authored-by: Syrus Akbary <me@syrusakbary.com>
2021-04-30 18:15:12 +00:00
2218056d2c Updated cargo fuzz 2021-04-30 10:46:20 -07:00
8006918fe5 Updated cargo fuzz page 2021-04-29 22:57:03 -07:00
2aa5122ee0 Merge branch 'master' into universal-compiled-info 2021-04-29 13:02:37 -07:00
68a351ee39 Update fuzz lockfile 2021-04-29 12:18:00 -07:00
ed87a078aa Update cargo fuzz lockfile 2021-04-29 09:49:52 -07:00
9e361db035 Fix unused bincode 2021-04-28 21:47:22 -07:00
b4056dacc3 cargo fmt buzz and make lint 2021-04-21 16:08:39 -07:00
4f220c474b cargo fmt fuzz 2021-04-21 15:44:57 -07:00
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
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
6c00c35e71 Remove fuzzer for Module::validate.
All this does is run it through wasmparser which is they already do fuzzing for themselves.
2021-04-16 14:04:56 -07:00
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
c995ec054b chore: Update loupe from 0.1.1 to 0.1.2. 2021-03-26 13:56:32 +01:00
dcebdfdac6 fix(fuzz) Update Cargo.lock. 2021-03-23 13:29:57 +01:00
5ff82e53f2 Merge branch 'master' into feat-memory-usage 2021-03-23 11:22:23 +01:00
4b752ed498 chore: Use loupe 0.1.0. 2021-03-23 11:18:31 +01:00
0193b7245c Add conditional compilation of fuzzers based on enabled compilers.
Fixes the build on windows CI where llvm isn't enabled.
2021-03-19 15:56:35 -07:00
67d4f49f04 Update fuzz/cargo.lock. 2021-03-19 15:30:33 -07:00