summaryrefslogtreecommitdiff
path: root/test/passes/simplify-locals_all-features_disable-exception-handling.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-10-23 10:17:13 -0700
committerGitHub <noreply@github.com>2024-10-23 10:17:13 -0700
commitdcc70bbfb16c2f8fce29dad94d80d1b78123655f (patch)
tree05db3b38ea848cef1010eac458549f012342b2fa /test/passes/simplify-locals_all-features_disable-exception-handling.wast
parent0d9b7508e5de1ca7befef493ed3e357b8a5613a1 (diff)
downloadbinaryen-dcc70bbfb16c2f8fce29dad94d80d1b78123655f.tar.gz
binaryen-dcc70bbfb16c2f8fce29dad94d80d1b78123655f.tar.bz2
binaryen-dcc70bbfb16c2f8fce29dad94d80d1b78123655f.zip
[EH] Fuzz throws from JS (#7027)
We already generated (throw ..) instructions in wasm, but it makes sense to model throws from outside as well, as they cross the module boundary. This adds a new fuzzer import to the generated modules, "throw", that just does a throw from JS etc. Also be more precise about handling fuzzing-support imports in fuzz-exec: we now check that logging functions start with "log*" and error otherwise (this check is now needed given we have "throw", which is not logging). Also fix a minor issue with name conflicts for logging functions by using getValidFunctionName for them, both for logging and for throw.
Diffstat (limited to 'test/passes/simplify-locals_all-features_disable-exception-handling.wast')
-rw-r--r--test/passes/simplify-locals_all-features_disable-exception-handling.wast6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/passes/simplify-locals_all-features_disable-exception-handling.wast b/test/passes/simplify-locals_all-features_disable-exception-handling.wast
index 0fc110696..44c31e344 100644
--- a/test/passes/simplify-locals_all-features_disable-exception-handling.wast
+++ b/test/passes/simplify-locals_all-features_disable-exception-handling.wast
@@ -1194,9 +1194,9 @@
(type $4 (func (param i32)))
(type $5 (func (param i32) (result i32)))
(type $6 (func (param i32 i32 i32 i32 i32 i32)))
- (import "fuzzing-support" "log1" (func $fimport$0 (result i32)))
- (import "fuzzing-support" "log2" (func $fimport$1 (param i32)))
- (import "fuzzing-support" "log3" (func $fimport$2 (param f32)))
+ (import "env" "get1" (func $fimport$0 (result i32)))
+ (import "fuzzing-support" "log-i32" (func $fimport$1 (param i32)))
+ (import "fuzzing-support" "log-f32" (func $fimport$2 (param f32)))
(memory 256 256 shared)
(global $global$0 (mut i32) (i32.const 10))
(func $nonatomics (result i32) ;; loads are reordered