diff options
author | Thomas Lively <tlively@google.com> | 2024-11-25 12:55:34 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-25 20:55:34 +0000 |
commit | 7cee02592033b830a05eeeb9990d15a1f33e6792 (patch) | |
tree | b93d0b5aecfb14fe8593f5c4e61b9a08cd03b5ce /test | |
parent | 8265573e14182ee7fd95d78e9c04c435486be9dc (diff) | |
download | binaryen-7cee02592033b830a05eeeb9990d15a1f33e6792.tar.gz binaryen-7cee02592033b830a05eeeb9990d15a1f33e6792.tar.bz2 binaryen-7cee02592033b830a05eeeb9990d15a1f33e6792.zip |
Fix memory.grow bounds and overflow checks for mem64 (#7112)
Previously the interpreter only executed overflow and bounds checks for
memory.grow on 32-bit memories. Run the checks on 64-bit memories as
well.
Diffstat (limited to 'test')
-rw-r--r-- | test/lit/exec/memory64.wast | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/lit/exec/memory64.wast b/test/lit/exec/memory64.wast index 273f2679a..0d28e719f 100644 --- a/test/lit/exec/memory64.wast +++ b/test/lit/exec/memory64.wast @@ -28,6 +28,14 @@ (i32.const 10) ) ) + + ;; CHECK: [fuzz-exec] calling memory.grow.fail + ;; CHECK-NEXT: [fuzz-exec] note result: memory.grow.fail => -1 + (func $memory.grow.fail (export "memory.grow.fail") (result i64) + (memory.grow + (i64.const -1) + ) + ) ) ;; CHECK: [fuzz-exec] calling memory.init.trap @@ -35,5 +43,9 @@ ;; CHECK: [fuzz-exec] calling memory.init.trap2 ;; CHECK-NEXT: [trap out of bounds segment access in memory.init] + +;; CHECK: [fuzz-exec] calling memory.grow.fail +;; CHECK-NEXT: [fuzz-exec] note result: memory.grow.fail => -1 +;; CHECK-NEXT: [fuzz-exec] comparing memory.grow.fail ;; CHECK-NEXT: [fuzz-exec] comparing memory.init.trap ;; CHECK-NEXT: [fuzz-exec] comparing memory.init.trap2 |