diff options
author | Wouter van Oortmerssen <aardappel@gmail.com> | 2020-09-28 17:28:20 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-28 17:28:20 -0700 |
commit | 9de15862c1bc4e2b092ccbe89fdb4b850704bbfc (patch) | |
tree | fe2315b31b96f32c4c015232ae864670a5c1636a /test | |
parent | 2a869194c5fb7f54b3811043bfcf723e3d53c1df (diff) | |
download | binaryen-9de15862c1bc4e2b092ccbe89fdb4b850704bbfc.tar.gz binaryen-9de15862c1bc4e2b092ccbe89fdb4b850704bbfc.tar.bz2 binaryen-9de15862c1bc4e2b092ccbe89fdb4b850704bbfc.zip |
Fix regression in memory.fill due to Memory64 (#3176)
details: https://github.com/WebAssembly/binaryen/issues/3149
Diffstat (limited to 'test')
-rw-r--r-- | test/spec/bulk-memory.wast | 4 | ||||
-rw-r--r-- | test/spec/bulk-memory64.wast | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/test/spec/bulk-memory.wast b/test/spec/bulk-memory.wast index 99485e66b..62e9cdb3a 100644 --- a/test/spec/bulk-memory.wast +++ b/test/spec/bulk-memory.wast @@ -39,6 +39,10 @@ ;; Writing 0 bytes outside of memory limit is NOT allowed. (assert_trap (invoke "fill" (i32.const 0x10001) (i32.const 0) (i32.const 0))) +;; Negative size +(assert_trap (invoke "fill" (i32.const 15) (i32.const 14) (i32.const -2))) +(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 0)) + ;; memory.copy (module (memory 1 1) diff --git a/test/spec/bulk-memory64.wast b/test/spec/bulk-memory64.wast index 060191216..5d0090e73 100644 --- a/test/spec/bulk-memory64.wast +++ b/test/spec/bulk-memory64.wast @@ -39,6 +39,10 @@ ;; Writing 0 bytes outside of memory limit is NOT allowed. (assert_trap (invoke "fill" (i64.const 0x10001) (i32.const 0) (i64.const 0))) +;; Negative size +(assert_trap (invoke "fill" (i64.const 15) (i32.const 14) (i64.const -2))) +(assert_return (invoke "load8_u" (i64.const 15)) (i32.const 0)) + ;; memory.copy (module (memory i64 1 1) |