Skip to content

Commit 1db33e8

Browse files
github-actions[bot]WebAssembly/testsuite auto-update
andauthored
Auto-update for 2025-04-02 (#122)
Update repos: wasm-3.0: WebAssembly/spec@3532eed custom-page-sizes: WebAssembly/custom-page-sizes@edb9c5b This change was automatically generated by `update-testsuite.py` Co-authored-by: WebAssembly/testsuite auto-update <github-actions@users.noreply.github.com>
1 parent d76759e commit 1db33e8

File tree

2 files changed

+64
-6
lines changed

2 files changed

+64
-6
lines changed

proposals/custom-page-sizes/memory_max.wast

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,12 @@
2323
"unknown import")
2424

2525
;; Memory size just over the maximum.
26-
;;
27-
;; These are malformed (for pagesize 1)
28-
;; or invalid (for other pagesizes).
2926

3027
;; i32 (pagesize 1)
31-
(assert_malformed
32-
(module quote "(memory 0x1_0000_0000 (pagesize 1))")
33-
"constant out of range")
28+
(assert_invalid
29+
(module
30+
(memory 0x1_0000_0000 (pagesize 1)))
31+
"memory size must be at most")
3432

3533
;; i32 (default pagesize)
3634
(assert_invalid

proposals/wasm-3.0/align.wast

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -962,3 +962,63 @@
962962
)
963963
"type mismatch"
964964
)
965+
966+
;; memop flags >= 0x80
967+
(assert_malformed
968+
(module binary
969+
"\00asm" "\01\00\00\00"
970+
"\01\04\01\60\00\00" ;; Type section: 1 type
971+
"\03\02\01\00" ;; Function section: 1 function
972+
"\05\03\01\00\01" ;; Memory section: 1 memory
973+
"\0a\0b\01" ;; Code section: 1 function
974+
975+
;; function 0
976+
"\09\00"
977+
"\41\00" ;; i32.const 0
978+
"\28\80\01\00" ;; i32.load offset=0 align="2**128" (malformed)
979+
"\1a" ;; drop
980+
"\0b" ;; end
981+
)
982+
"malformed memop flags"
983+
)
984+
985+
;; memop flags > 0xff (and & 0xff = 0)
986+
(assert_malformed
987+
(module binary
988+
"\00asm" "\01\00\00\00"
989+
"\01\04\01\60\00\00" ;; Type section: 1 type
990+
"\03\02\01\00" ;; Function section: 1 function
991+
"\05\03\01\00\01" ;; Memory section: 1 memory
992+
"\0a\0b\01" ;; Code section: 1 function
993+
994+
;; function 0
995+
"\09\00"
996+
"\41\00" ;; i32.const 0
997+
"\28\80\02\00" ;; i32.load offset=0 align="2**256" (malformed)
998+
"\1a" ;; drop
999+
"\0b" ;; end
1000+
)
1001+
"malformed memop flags"
1002+
)
1003+
1004+
;; Max align and offset in non-malformed text
1005+
(module
1006+
(memory i64 1)
1007+
(func
1008+
i64.const 0
1009+
i32.load offset=0xFFFF_FFFF_FFFF_FFFF
1010+
drop
1011+
)
1012+
)
1013+
1014+
(assert_invalid
1015+
(module
1016+
(memory 1)
1017+
(func
1018+
i32.const 0
1019+
i32.load offset=0xFFFF_FFFF_FFFF_FFFF align=0x8000_0000_0000_0000
1020+
drop
1021+
)
1022+
)
1023+
"alignment must not be larger than natural"
1024+
)

0 commit comments

Comments
 (0)