Update some fuzzing defaults and infrastructure#1793
Merged
alexcrichton merged 2 commits intobytecodealliance:mainfrom Sep 17, 2024
Merged
Update some fuzzing defaults and infrastructure#1793alexcrichton merged 2 commits intobytecodealliance:mainfrom
alexcrichton merged 2 commits intobytecodealliance:mainfrom
Conversation
* Update `wasm_smith::Config` to default-enable some stage4+ proposals: `exceptions`, `gc`, `reference_types`, `relaxed_simd`, `simd`, `tail_call`, `threads`. These can still all be disabled via configuration and CLI flags. * All stage4+ proposals are now swarm-enabled through `Arbitrary for Config` * Default generation of modules in wasm-tools's own fuzzing no longer special-cases these proposals since they're all already handled. * The `WasmFeatures` used for validating fuzz-generated modules now starts with a minimal baseline set of features to ensure that all proposals are disabled in the validator if the corresponding wasm-smith configuration flag is disabled. * The `wasm-mutate` crate was updated to return errors instead of panicking for unsupported wasm proposals. All wasm proposals are now enabled when passing to `wasm-mutate`. The primary motivation for this commit was this last point where I'm seeing panics on OSS-Fuzz for Wasmtime using `wasm-mutate` as a mutation hook because `wasm-mutate` is panicking on some GC types. When fixing that I noticed other fuzz-related things I wanted to clean up while I was here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
wasm_smith::Configto default-enable some stage4+ proposals:exceptions,gc,reference_types,relaxed_simd,simd,tail_call,threads. These can still all be disabled via configuration and CLI flags.Arbitrary for ConfigWasmFeaturesused for validating fuzz-generated modules now starts with a minimal baseline set of features to ensure that all proposals are disabled in the validator if the corresponding wasm-smith configuration flag is disabled.wasm-mutatecrate was updated to return errors instead of panicking for unsupported wasm proposals. All wasm proposals are now enabled when passing towasm-mutate.The primary motivation for this commit was this last point where I'm seeing panics on OSS-Fuzz for Wasmtime using
wasm-mutateas a mutation hook becausewasm-mutateis panicking on some GC types. When fixing that I noticed other fuzz-related things I wanted to clean up while I was here.