diff options
author | Ashley Nelson <nashley@google.com> | 2022-12-09 16:18:44 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-09 16:18:44 -0800 |
commit | f5e71e6d2be82639681fc7d45794645e03d2ad93 (patch) | |
tree | a4438a50c46f3c96aefdc469e5fde272a87518dd /test/lit/help | |
parent | 082dbe25b7377809b1b3dc429cb334fc80fac286 (diff) | |
download | binaryen-f5e71e6d2be82639681fc7d45794645e03d2ad93.tar.gz binaryen-f5e71e6d2be82639681fc7d45794645e03d2ad93.tar.bz2 binaryen-f5e71e6d2be82639681fc7d45794645e03d2ad93.zip |
Adds bounds checks to Load/Store in Multi-Memories Lowering Pass (#5256)
Per the wasm spec guidelines for Load (rule 10) & Store (rule 12), this PR adds an option for bounds checking, producing a runtime error if the instruction exceeds the bounds of the particular memory within the combined memory.
Diffstat (limited to 'test/lit/help')
-rw-r--r-- | test/lit/help/wasm-opt.test | 5 | ||||
-rw-r--r-- | test/lit/help/wasm2js.test | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/test/lit/help/wasm-opt.test b/test/lit/help/wasm-opt.test index a5c21af8b..22e3baaf1 100644 --- a/test/lit/help/wasm-opt.test +++ b/test/lit/help/wasm-opt.test @@ -282,6 +282,11 @@ ;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into ;; CHECK-NEXT: a single memory ;; CHECK-NEXT: +;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into +;; CHECK-NEXT: a single memory, trapping if the +;; CHECK-NEXT: read or write is larger than the +;; CHECK-NEXT: length of the memory's data +;; CHECK-NEXT: ;; CHECK-NEXT: --name-types (re)name all heap types ;; CHECK-NEXT: ;; CHECK-NEXT: --nm name list diff --git a/test/lit/help/wasm2js.test b/test/lit/help/wasm2js.test index 3073bf2f9..b901c253c 100644 --- a/test/lit/help/wasm2js.test +++ b/test/lit/help/wasm2js.test @@ -241,6 +241,11 @@ ;; CHECK-NEXT: --multi-memory-lowering combines multiple memories into ;; CHECK-NEXT: a single memory ;; CHECK-NEXT: +;; CHECK-NEXT: --multi-memory-lowering-with-bounds-checks combines multiple memories into +;; CHECK-NEXT: a single memory, trapping if the +;; CHECK-NEXT: read or write is larger than the +;; CHECK-NEXT: length of the memory's data +;; CHECK-NEXT: ;; CHECK-NEXT: --name-types (re)name all heap types ;; CHECK-NEXT: ;; CHECK-NEXT: --nm name list |