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

Enable fuzzing the module linking implementation #2497

Merged
merged 1 commit into from Dec 11, 2020

Conversation

@alexcrichton
Copy link
Member

@alexcrichton alexcrichton commented Dec 11, 2020

This commit updates all the wasm-tools crates that we use and enables
fuzzing of the module linking proposal in our various fuzz targets. This
also refactors some of the dummy value generation logic to not be
fallible and to always succeed, the thinking being that we don't want to
accidentally hide errors while fuzzing. Additionally instantiation is
only allowed to fail with a Trap, other failure reasons are unwrapped.

This commit updates all the wasm-tools crates that we use and enables
fuzzing of the module linking proposal in our various fuzz targets. This
also refactors some of the dummy value generation logic to not be
fallible and to always succeed, the thinking being that we don't want to
accidentally hide errors while fuzzing. Additionally instantiation is
only allowed to fail with a `Trap`, other failure reasons are unwrapped.
@github-actions
Copy link

@github-actions github-actions bot commented Dec 11, 2020

Subscribe to Label Action

cc @fitzgen, @peterhuene

This issue or pull request has been labeled: "cranelift", "cranelift:area:peepmatic", "cranelift:wasm", "fuzzing", "lightbeam", "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: cranelift:area:peepmatic, fuzzing
  • peterhuene: wasmtime:api

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Copy link
Member

@fitzgen fitzgen left a comment

Thanks for cleaning up the dummy imports stuff!

///
/// This is done by using the expected type to generate a module on-the-fly.
pub fn dummy_module(store: &Store, ty: ModuleType) -> Module {
let mut wat = WatGenerator::new();

This comment has been minimized.

@fitzgen

fitzgen Dec 11, 2020
Member

This doesn't seem a ton easier than using wasm-encoder directly. Want to file a follow up issue that we can mark good-first-issue for some contributor to replace this with wasm-encoder? Would help us get a little bit more fuzzing throughput here.

This comment has been minimized.

@fitzgen

fitzgen Dec 11, 2020
Member

I guess I can just file it, since there was nothing else for me to nitpick before this merged :-p

This comment has been minimized.

@alexcrichton

alexcrichton Dec 11, 2020
Author Member

Oh heh good point!

@fitzgen fitzgen merged commit 9ccef59 into bytecodealliance:main Dec 11, 2020
23 checks passed
23 checks passed
@github-actions
Rustfmt
Details
@github-actions
Doc - build the book
Details
@github-actions
Doc - build the API documentation
Details
@github-actions
Doc - build the C API documentation
Details
@github-actions
Check
Details
@github-actions
Fuzz Targets
Details
@github-actions
Rebuild Peephole Optimizers
Details
@github-actions
Test (stable) Test (stable)
Details
@github-actions
Test (beta) Test (beta)
Details
@github-actions
Test (nightly) Test (nightly)
Details
@github-actions
Test (windows) Test (windows)
Details
@github-actions
Test (macos) Test (macos)
Details
@github-actions
Test x64 new backend
Details
@github-actions
Test wasi-nn module
Details
@github-actions
Meta deterministic check
Details
@github-actions
Build wasmtime (x86_64-linux, ubuntu-latest, stable)
Details
@github-actions
Build wasmtime (x86_64-macos, macos-latest, stable)
Details
@github-actions
Build wasmtime (x86_64-windows, windows-latest, stable)
Details
@github-actions
Build wasmtime (x86_64-mingw, windows-latest, x86_64-pc-windows-gnu, beta)
Details
@github-actions
Build wasmtime (aarch64-linux, ubuntu-latest, stable, aarch64-unknown-linux-gnu, gcc-aarch64-linu...
Details
@github-actions
cargo-audit
Details
@github-actions
verify-publish
Details
@github-actions
Publish
Details
@alexcrichton alexcrichton deleted the alexcrichton:fuzz-module-linking branch Dec 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants