diff options
author | Alon Zakai <azakai@google.com> | 2022-04-22 10:56:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-22 10:56:40 -0700 |
commit | e16f1e7f250a832742397a1f082c9ea161619ca8 (patch) | |
tree | ce433a68075350520dae08c2ff77565b3c38d530 /test/lit/passes | |
parent | 2ab19d9ac528ff11fa14b184a84c92e72d5b0163 (diff) | |
download | binaryen-e16f1e7f250a832742397a1f082c9ea161619ca8.tar.gz binaryen-e16f1e7f250a832742397a1f082c9ea161619ca8.tar.bz2 binaryen-e16f1e7f250a832742397a1f082c9ea161619ca8.zip |
[NominalFuzzing] SignatureRefining: Ignore exported functions (#4601)
This hits the fuzzer when it tries to call reference exports with a null.
Diffstat (limited to 'test/lit/passes')
-rw-r--r-- | test/lit/passes/signature-refining.wast | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/test/lit/passes/signature-refining.wast b/test/lit/passes/signature-refining.wast index fcffcc550..a6d4ba53f 100644 --- a/test/lit/passes/signature-refining.wast +++ b/test/lit/passes/signature-refining.wast @@ -624,3 +624,34 @@ (unreachable) ) ) + +;; Exports prevent optimization, so $func's type will not change here. +(module + ;; CHECK: (type $sig (func_subtype (param anyref) func)) + + ;; CHECK: (type $none_=>_none (func_subtype func)) + + ;; CHECK: (type $struct (struct_subtype data)) + (type $struct (struct_subtype data)) + + (type $sig (func_subtype (param anyref) func)) + + ;; CHECK: (export "prevent-opts" (func $func)) + + ;; CHECK: (func $func (type $sig) (param $x anyref) + ;; CHECK-NEXT: (nop) + ;; CHECK-NEXT: ) + (func $func (export "prevent-opts") (type $sig) (param $x anyref) + ) + + ;; CHECK: (func $caller (type $none_=>_none) + ;; CHECK-NEXT: (call $func + ;; CHECK-NEXT: (struct.new_default $struct) + ;; CHECK-NEXT: ) + ;; CHECK-NEXT: ) + (func $caller + (call $func + (struct.new $struct) + ) + ) +) |