summaryrefslogtreecommitdiff
path: root/test/lit/exec
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-08-24 09:56:23 -0700
committerGitHub <noreply@github.com>2022-08-24 09:56:23 -0700
commit892ebbe8a11417d0ffd3a5c798fb8bdab89d6634 (patch)
tree0c4b30aee02211a9ded29358db765f45e5424c28 /test/lit/exec
parent594ff7b9609656edb83187cb4600b23b3f2fde37 (diff)
downloadbinaryen-892ebbe8a11417d0ffd3a5c798fb8bdab89d6634.tar.gz
binaryen-892ebbe8a11417d0ffd3a5c798fb8bdab89d6634.tar.bz2
binaryen-892ebbe8a11417d0ffd3a5c798fb8bdab89d6634.zip
Fuzzer simplification: Remove trap-ignoring logic (#4958)
The "ignore trap" logic there is not close to enough for what we'd need to actually fuzz in a way that ignores traps, so this removes it. Atm that logic just allows a trap to happen without causing an error (that is, when comparing two results, one might trap and the other not, but they'd still be considered "equal"). But due to how we optimize traps in TrapsNeverHappens mode, the optimizer is free to assume the trap never occurs, which might remove side effects that are noticeable later. To actually handle that, we'd need to refactor the code to retain results per function (including the Loggings) and then to ignore everything from the very first trapping function. That is somewhat complicated to do, and a simpler thing is done in #4936, so we won't need it here.
Diffstat (limited to 'test/lit/exec')
-rw-r--r--test/lit/exec/trap.wast55
1 files changed, 0 insertions, 55 deletions
diff --git a/test/lit/exec/trap.wast b/test/lit/exec/trap.wast
deleted file mode 100644
index a0ed6f0f2..000000000
--- a/test/lit/exec/trap.wast
+++ /dev/null
@@ -1,55 +0,0 @@
-;; NOTE: Assertions have been generated by update_lit_checks.py --output=fuzz-exec and should not be edited.
-
-;; RUN: wasm-opt %s --vacuum --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s
-;; RUN: wasm-opt %s --ignore-implicit-traps --vacuum --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s --check-prefix=IIT
-;; RUN: wasm-opt %s --traps-never-happen --vacuum --fuzz-exec -q -o /dev/null 2>&1 | filecheck %s --check-prefix=TNH
-
-(module
- ;; CHECK: [fuzz-exec] calling trap
- ;; CHECK-NEXT: [trap unreachable]
- ;; IIT: [fuzz-exec] calling trap
- ;; IIT-NEXT: [trap unreachable]
- ;; TNH: [fuzz-exec] calling trap
- ;; TNH-NEXT: [trap unreachable]
- (func "trap"
- (unreachable)
- )
-
- (memory 1 1)
- ;; CHECK: [fuzz-exec] calling load-trap
- ;; CHECK-NEXT: [trap highest > memory: 65536 > 65532]
- ;; IIT: [fuzz-exec] calling load-trap
- ;; IIT-NEXT: [trap highest > memory: 65536 > 65532]
- ;; TNH: [fuzz-exec] calling load-trap
- ;; TNH-NEXT: [trap highest > memory: 65536 > 65532]
- (func "load-trap"
- ;; This load traps, so this cannot be removed. But if either of
- ;; --ignore-implicit-traps or --traps-never-happen is set, this load is
- ;; assumed not to trap and we end up optimizing this out with --vacuum,
- ;; causes the trap behavior to change. This should not result in [fuzz-exec]
- ;; comparison failure.
- (drop
- (i32.load (i32.const 65536))
- )
- )
-)
-;; CHECK: [fuzz-exec] calling trap
-;; CHECK-NEXT: [trap unreachable]
-
-;; CHECK: [fuzz-exec] calling load-trap
-;; CHECK-NEXT: [trap highest > memory: 65536 > 65532]
-;; CHECK-NEXT: [fuzz-exec] comparing load-trap
-;; CHECK-NEXT: [fuzz-exec] comparing trap
-
-;; IIT: [fuzz-exec] calling trap
-;; IIT-NEXT: [trap unreachable]
-
-;; IIT: [fuzz-exec] calling load-trap
-;; IIT-NEXT: [fuzz-exec] comparing load-trap
-;; IIT-NEXT: [fuzz-exec] comparing trap
-
-;; TNH: [fuzz-exec] calling trap
-
-;; TNH: [fuzz-exec] calling load-trap
-;; TNH-NEXT: [fuzz-exec] comparing load-trap
-;; TNH-NEXT: [fuzz-exec] comparing trap