summaryrefslogtreecommitdiff
path: root/src/tools/execution-results.h
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-12-16 15:21:10 -0800
committerGitHub <noreply@github.com>2024-12-16 15:21:10 -0800
commitaa0550e28002183dd7ea9c2a48ec3533ba70f862 (patch)
tree56566cbe1c03ef9477171651cb8514289c16a65e /src/tools/execution-results.h
parent353b759b230dff8fb82aeb157aeb6db360d74a49 (diff)
downloadbinaryen-aa0550e28002183dd7ea9c2a48ec3533ba70f862.tar.gz
binaryen-aa0550e28002183dd7ea9c2a48ec3533ba70f862.tar.bz2
binaryen-aa0550e28002183dd7ea9c2a48ec3533ba70f862.zip
Fuzz JSPI (#7148)
* Add a new "sleep" fuzzer import, that does a sleep for some ms. * Add JSPI support in fuzz_shell.js. This is in the form of commented-out async/await keywords - commented out so that normal fuzzing is not impacted. When we want to fuzz JSPI, we uncomment them. We also apply the JSPI operations of marking imports and exports as suspending/promising. JSPI fuzzing is added to both fuzz_opt.py and ClusterFuzz's run.py.
Diffstat (limited to 'src/tools/execution-results.h')
-rw-r--r--src/tools/execution-results.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tools/execution-results.h b/src/tools/execution-results.h
index b8823c3f0..ea822d547 100644
--- a/src/tools/execution-results.h
+++ b/src/tools/execution-results.h
@@ -128,6 +128,9 @@ public:
} catch (const WasmException& e) {
return {Literal(int32_t(1))};
}
+ } else if (import->base == "sleep") {
+ // Do not actually sleep, just return the id.
+ return {arguments[1]};
} else {
WASM_UNREACHABLE("unknown fuzzer import");
}