diff options
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) |