Skip to content

fuzz: allow generating shared memories#4266

Merged
abrown merged 6 commits intobytecodealliance:mainfrom
abrown:fuzz-shared-memory
Jun 14, 2022
Merged

fuzz: allow generating shared memories#4266
abrown merged 6 commits intobytecodealliance:mainfrom
abrown:fuzz-shared-memory

Conversation

@abrown
Copy link
Member

@abrown abrown commented Jun 13, 2022

wasm-smith v0.11 has support for generating shared memories when the
threads_enabled configuration flag is set. This change turns on that
flag occasionally.

@abrown abrown mentioned this pull request Jun 13, 2022
11 tasks
`wasm-smith` v0.11 has support for generating shared memories when the
`threads_enabled` configuration flag is set. This change turns on that
flag occasionally.
@abrown abrown force-pushed the fuzz-shared-memory branch from de9ba56 to 47ade13 Compare June 13, 2022 18:46
@abrown abrown requested review from alexcrichton and fitzgen June 13, 2022 18:46
@abrown
Copy link
Member Author

abrown commented Jun 13, 2022

@alexcrichton, @fitzgen: I am not really sure if this is the only place where the threads flag should be enabled to start generating shared memories--is there somewhere else that this makes sense to do?

@github-actions github-actions bot added the fuzzing Issues related to our fuzzing infrastructure label Jun 13, 2022
@github-actions
Copy link

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "fuzzing"

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

  • fitzgen: fuzzing

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

Learn more.

@alexcrichton
Copy link
Member

I think you'll also need to add cfg.wasm_threads(...) to the actual Config generation. Additionally this feature may also need disabling in set_differential_config (but could be reenabled with v8 perhaps since we don't actually use threads). Otherwise though I think this is the main location.

Pending #4260 it might be good to run this for a bit locally to see if anything quickly pops up and/or introduce a purposeful bug/panic to make sure the fuzzer finds it at some point.

pub fn set_spectest_compliant(&mut self) {
let config = &mut self.module_config.config;
config.memory64_enabled = false;
config.simd_enabled = false;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI: this was removed as a cleanup because line 350 below has config.simd_enabled = true;

@abrown
Copy link
Member Author

abrown commented Jun 13, 2022

This change is pending bytecodealliance/wasm-tools#639 and a new version of wasm-smith on crates.io.

@abrown abrown marked this pull request as ready for review June 14, 2022 16:11
@abrown abrown merged commit 22e13fe into bytecodealliance:main Jun 14, 2022
@abrown abrown deleted the fuzz-shared-memory branch June 14, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants