-
Notifications
You must be signed in to change notification settings - Fork 315
Closed
Labels
good first issueGood for newcomersGood for newcomerswasm-smithRelated to the wasm-smith crate and creating wasm modules for fuzzingRelated to the wasm-smith crate and creating wasm modules for fuzzing
Description
Right now, wasm_smith::Config::threads_enabled only configures whether we will generate shared memories or not. We should also emit atomic instructions and wait/notify instructions.
The instructions we should support: https://webassembly.github.io/threads/core/syntax/instructions.html#syntax-instr-atomic-memory
The place we need to add that support:
wasm-tools/crates/wasm-smith/src/core/code_builder.rs
Lines 76 to 93 in 44b5ea4
| // The static set of options of instruction to generate that could be valid at | |
| // some given time. One entry per Wasm instruction. | |
| // | |
| // Each entry is made up of up to three parts: | |
| // | |
| // 1. A predicate for whether this is a valid choice, if any. `None` means that | |
| // the choice is always applicable. | |
| // | |
| // 2. The function to generate the instruction, given that we've made this | |
| // choice. | |
| // | |
| // 3. The `InstructionKind` the instruction belongs to; this allows filtering | |
| // out instructions by category. | |
| // | |
| // 4. An optional number used to weight how often this instruction is chosen. | |
| // Higher numbers are less likely to be chosen, and number specified must be | |
| // less than 1000. | |
| instructions! { |
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomerswasm-smithRelated to the wasm-smith crate and creating wasm modules for fuzzingRelated to the wasm-smith crate and creating wasm modules for fuzzing