diff options
author | Keith Winstein <208955+keithw@users.noreply.github.com> | 2024-11-08 07:45:07 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-08 07:45:07 -0800 |
commit | 765b47d02aac894da80b74284263d1b487415aa0 (patch) | |
tree | 9e7275ddf2f8f3326c3a779e30a3aa963159ffa7 /test | |
parent | c1d97e9c75c687faa81fe0ab4f1ac77c30487f47 (diff) | |
download | wabt-765b47d02aac894da80b74284263d1b487415aa0.tar.gz wabt-765b47d02aac894da80b74284263d1b487415aa0.tar.bz2 wabt-765b47d02aac894da80b74284263d1b487415aa0.zip |
Add support for the custom-page-sizes proposal (#2502)
This adds support in the binary/text parsers and writers,
the validator and interpreter, and objdump (but not wasm2c).
Diffstat (limited to 'test')
-rw-r--r-- | test/binary/bad-memory-limits-flag.txt | 6 | ||||
-rw-r--r-- | test/help/spectest-interp.txt | 1 | ||||
-rw-r--r-- | test/help/wasm-interp.txt | 1 | ||||
-rw-r--r-- | test/help/wasm-stats.txt | 1 | ||||
-rw-r--r-- | test/help/wasm-validate.txt | 1 | ||||
-rw-r--r-- | test/help/wasm2wat.txt | 1 | ||||
-rw-r--r-- | test/help/wast2json.txt | 1 | ||||
-rw-r--r-- | test/help/wat-desugar.txt | 1 | ||||
-rw-r--r-- | test/help/wat2wasm.txt | 1 | ||||
-rw-r--r-- | test/interp/custom-page-sizes.txt | 131 | ||||
-rw-r--r-- | test/roundtrip/custom-page-sizes.txt | 91 | ||||
-rwxr-xr-x | test/run-roundtrip.py | 3 | ||||
-rw-r--r-- | test/spec/custom-page-sizes/custom-page-sizes-invalid.txt | 63 | ||||
-rw-r--r-- | test/spec/custom-page-sizes/custom-page-sizes.txt | 9 | ||||
-rw-r--r-- | test/spec/memory64/binary.txt | 4 |
15 files changed, 310 insertions, 5 deletions
diff --git a/test/binary/bad-memory-limits-flag.txt b/test/binary/bad-memory-limits-flag.txt index 3e8922b8..7c413f59 100644 --- a/test/binary/bad-memory-limits-flag.txt +++ b/test/binary/bad-memory-limits-flag.txt @@ -3,9 +3,9 @@ magic version section(MEMORY) { count[1] - flags[8] + flags[16] } (;; STDERR ;;; -000000c: error: malformed memory limits flag: 8 -000000c: error: malformed memory limits flag: 8 +000000c: error: malformed memory limits flag: 16 +000000c: error: malformed memory limits flag: 16 ;;; STDERR ;;) diff --git a/test/help/spectest-interp.txt b/test/help/spectest-interp.txt index 0bbeb97b..3fc0e6d7 100644 --- a/test/help/spectest-interp.txt +++ b/test/help/spectest-interp.txt @@ -31,6 +31,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features -V, --value-stack-size=SIZE Size in elements of the value stack -C, --call-stack-size=SIZE Size in elements of the call stack diff --git a/test/help/wasm-interp.txt b/test/help/wasm-interp.txt index f0199d0a..800532e6 100644 --- a/test/help/wasm-interp.txt +++ b/test/help/wasm-interp.txt @@ -45,6 +45,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features -V, --value-stack-size=SIZE Size in elements of the value stack -C, --call-stack-size=SIZE Size in elements of the call stack diff --git a/test/help/wasm-stats.txt b/test/help/wasm-stats.txt index fb3b7583..5e83b1e3 100644 --- a/test/help/wasm-stats.txt +++ b/test/help/wasm-stats.txt @@ -31,6 +31,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features -o, --output=FILENAME Output file for the stats, by default use stdout -c, --cutoff=N Cutoff for reporting counts less than N diff --git a/test/help/wasm-validate.txt b/test/help/wasm-validate.txt index 8e3de11b..1b4b424b 100644 --- a/test/help/wasm-validate.txt +++ b/test/help/wasm-validate.txt @@ -31,6 +31,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features --no-debug-names Ignore debug names in the binary file --ignore-custom-section-errors Ignore errors in custom sections diff --git a/test/help/wasm2wat.txt b/test/help/wasm2wat.txt index 39f7ae35..f2b2f5c8 100644 --- a/test/help/wasm2wat.txt +++ b/test/help/wasm2wat.txt @@ -37,6 +37,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features --inline-exports Write all exports inline --inline-imports Write all imports inline diff --git a/test/help/wast2json.txt b/test/help/wast2json.txt index d6888fc2..1dbb9c54 100644 --- a/test/help/wast2json.txt +++ b/test/help/wast2json.txt @@ -34,6 +34,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features -o, --output=FILE output JSON file -r, --relocatable Create a relocatable wasm binary (suitable for linking with e.g. lld) diff --git a/test/help/wat-desugar.txt b/test/help/wat-desugar.txt index 5d84034f..2560ed75 100644 --- a/test/help/wat-desugar.txt +++ b/test/help/wat-desugar.txt @@ -41,6 +41,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features --generate-names Give auto-generated names to non-named functions, types, etc. ;;; STDOUT ;;) diff --git a/test/help/wat2wasm.txt b/test/help/wat2wasm.txt index 31ca9714..19b3d5d1 100644 --- a/test/help/wat2wasm.txt +++ b/test/help/wat2wasm.txt @@ -41,6 +41,7 @@ options: --enable-multi-memory Enable Multi-memory --enable-extended-const Enable Extended constant expressions --enable-relaxed-simd Enable Relaxed SIMD + --enable-custom-page-sizes Enable Custom page sizes --enable-all Enable all features -o, --output=FILE Output wasm binary file. Use "-" to write to stdout. -r, --relocatable Create a relocatable wasm binary (suitable for linking with e.g. lld) diff --git a/test/interp/custom-page-sizes.txt b/test/interp/custom-page-sizes.txt new file mode 100644 index 00000000..2f1692ca --- /dev/null +++ b/test/interp/custom-page-sizes.txt @@ -0,0 +1,131 @@ +;;; TOOL: run-interp-spec +;;; ARGS*: --enable-custom-page-sizes --enable-memory64 + +;; Page size of zero is malformed +(assert_malformed + (module quote "(memory 0 (pagesize 0))") + "invalid custom page size") + +;; Maximum memory sizes with pagesize 1 and 65536 +;; These are valid but would instantiate a huge memory, +;; so test with `assert_unlinkable`. + +;; i32 (pagesize 1) +(assert_unlinkable + (module + (import "test" "unknown" (func)) + (memory 0xFFFF_FFFF (pagesize 1))) + "unknown import") + +;; i64 (pagesize 1) +(assert_unlinkable + (module + (import "test" "import" (func)) + (memory i64 0xFFFF_FFFF_FFFF_FFFF (pagesize 1))) + "unknown import") + +;; i32 (default pagesize) +(assert_unlinkable + (module + (import "test" "unknown" (func)) + (memory 65536 (pagesize 65536))) + "unknown import") + +;; i64 (default pagesize) +(assert_unlinkable + (module + (import "test" "unknown" (func)) + (memory i64 0x1_0000_0000_0000 (pagesize 65536))) + "unknown import") + +;; Memory size just over the maximum. +;; +;; These are malformed (for pagesize 1) +;; or invalid (for other pagesizes). + +;; i32 (pagesize 1) +(assert_malformed + (module quote "(memory 0x1_0000_0000 (pagesize 1))") + "constant out of range") + +;; i64 (pagesize 1) +(assert_malformed + (module quote "(memory i64 0x1_0000_0000_0000_0000 (pagesize 1))") + "constant out of range") + +;; i32 (default pagesize) +(assert_invalid + (module + (memory 65537 (pagesize 65536))) + "memory size must be at most") + +;; i64 (default pagesize) +(assert_invalid + (module + (memory i64 0x1_0000_0000_0001 (pagesize 65536))) + "memory size must be at most") + +;; Test data abbreviation syntax + +(assert_malformed (module quote "(memory (pagesize 0) (data))") "invalid custom page size") + +(module + (memory (pagesize 1) (data "xyz")) + (func (export "size") (result i32) + memory.size) + (func (export "grow") (param i32) (result i32) + (memory.grow (local.get 0))) + (func (export "load") (param i32) (result i32) + (i32.load8_u (local.get 0)))) + +(assert_return (invoke "size") (i32.const 3)) +(assert_return (invoke "load" (i32.const 0)) (i32.const 120)) +(assert_return (invoke "load" (i32.const 1)) (i32.const 121)) +(assert_return (invoke "load" (i32.const 2)) (i32.const 122)) +(assert_trap (invoke "load" (i32.const 3)) "out of bounds") +(assert_return (invoke "grow" (i32.const 1)) (i32.const -1)) + +(module + (memory (pagesize 65536) (data "xyz")) + (func (export "size") (result i32) + memory.size)) + +(assert_return (invoke "size") (i32.const 1)) + +(;; STDOUT ;;; +out/test/interp/custom-page-sizes.txt:6: assert_malformed passed: + out/test/interp/custom-page-sizes/custom-page-sizes.0.wat:1:21: error: malformed custom page size + (memory 0 (pagesize 0)) + ^ +out/test/interp/custom-page-sizes.txt:15: assert_unlinkable passed: + error: invalid import "test.unknown" +out/test/interp/custom-page-sizes.txt:22: assert_unlinkable passed: + error: invalid import "test.import" +out/test/interp/custom-page-sizes.txt:29: assert_unlinkable passed: + error: invalid import "test.unknown" +out/test/interp/custom-page-sizes.txt:36: assert_unlinkable passed: + error: invalid import "test.unknown" +out/test/interp/custom-page-sizes.txt:48: assert_malformed passed: + out/test/interp/custom-page-sizes/custom-page-sizes.5.wat:1:9: error: invalid int "0x1_0000_0000" + (memory 0x1_0000_0000 (pagesize 1)) + ^^^^^^^^^^^^^ +out/test/interp/custom-page-sizes.txt:53: assert_malformed passed: + out/test/interp/custom-page-sizes/custom-page-sizes.6.wat:1:13: error: invalid int "0x1_0000_0000_0000_0000" + (memory i64 0x1_0000_0000_0000_0000 (pagesize 1)) + ^^^^^^^^^^^^^^^^^^^^^^^ +out/test/interp/custom-page-sizes.txt:58: assert_invalid passed: + out/test/interp/custom-page-sizes/custom-page-sizes.7.wasm:000000f: error: initial pages (65537) must be <= (65536) + 000000f: error: OnMemory callback failed +out/test/interp/custom-page-sizes.txt:64: assert_invalid passed: + out/test/interp/custom-page-sizes/custom-page-sizes.8.wasm:0000013: error: initial pages (281474976710657) must be <= (281474976710656) + 0000013: error: OnMemory callback failed +out/test/interp/custom-page-sizes.txt:70: assert_malformed passed: + out/test/interp/custom-page-sizes/custom-page-sizes.9.wat:1:19: error: malformed custom page size + (memory (pagesize 0) (data)) + ^ + out/test/interp/custom-page-sizes/custom-page-sizes.9.wat:1:28: error: unexpected token ), expected EOF. + (memory (pagesize 0) (data)) + ^ +out/test/interp/custom-page-sizes.txt:85: assert_trap passed: out of bounds memory access: access at 3+1 >= max value 3 +19/19 tests passed. +;;; STDOUT ;;) diff --git a/test/roundtrip/custom-page-sizes.txt b/test/roundtrip/custom-page-sizes.txt new file mode 100644 index 00000000..8aef1316 --- /dev/null +++ b/test/roundtrip/custom-page-sizes.txt @@ -0,0 +1,91 @@ +;;; TOOL: run-roundtrip +;;; ARGS*: --stdout --enable-custom-page-sizes --enable-multi-memory --enable-memory64 --debug-names +(module + (import "n" "mem2" (memory 23 (pagesize 1))) + (import "o" "mem3" (memory 24 25 (pagesize 1))) + (import "n" "mem2" (memory 23 (pagesize 65536))) + (import "o" "mem3" (memory 24 25 (pagesize 65536))) + (import "n" "mem2" (memory $g i64 23 (pagesize 1))) + (import "o" "mem3" (memory $h i64 24 25 (pagesize 1))) + (import "n" "mem2" (memory i64 23 (pagesize 65536))) + (import "o" "mem3" (memory i64 24 25 (pagesize 65536))) + + (memory (import "m" "mem1") 107 (pagesize 1)) + (memory (import "m" "mem1") 107 (pagesize 65536)) + (memory $c (import "m" "mem1") i64 107 (pagesize 1)) + (memory (import "m" "mem1") i64 107 (pagesize 65536)) + + (memory 57 (pagesize 1)) + (memory 73 92 (pagesize 1)) + (memory (pagesize 1) (data)) + (memory (pagesize 1) (data "xyz")) + (memory 57 (pagesize 65536)) + (memory 73 92 (pagesize 65536)) + (memory (pagesize 65536) (data)) + (memory (pagesize 65536) (data "xyz")) + (memory $a i64 57 (pagesize 1)) + (memory $b i64 73 92 (pagesize 1)) + (memory $d i64 (pagesize 1) (data)) + (memory $e i64 (pagesize 1) (data "xyz")) + (memory $k i64 (data)) + (memory $i i64 (pagesize 65536) (data)) + (memory $j i64 (pagesize 65536) (data "xyz")) + (memory i64 57 (pagesize 65536)) + (memory i64 73 92 (pagesize 65536)) + (memory i64 (pagesize 65536) (data)) + (memory i64 (pagesize 65536) (data "xyz")) + + (memory 0xFFFF_FFFF (pagesize 1)) + (memory i64 0xFFFF_FFFF_FFFF_FFFF (pagesize 1)) + (memory 0x10000 (pagesize 0x10000)) + (memory i64 0x1_0000_0000_0000 (pagesize 0x10000)) +) +(;; STDOUT ;;; +(module + (import "n" "mem2" (memory (;0;) 23 (pagesize 1))) + (import "o" "mem3" (memory (;1;) 24 25 (pagesize 1))) + (import "n" "mem2" (memory (;2;) 23)) + (import "o" "mem3" (memory (;3;) 24 25)) + (import "n" "mem2" (memory $g i64 23 (pagesize 1))) + (import "o" "mem3" (memory $h i64 24 25 (pagesize 1))) + (import "n" "mem2" (memory (;6;) i64 23)) + (import "o" "mem3" (memory (;7;) i64 24 25)) + (import "m" "mem1" (memory (;8;) 107 (pagesize 1))) + (import "m" "mem1" (memory (;9;) 107)) + (import "m" "mem1" (memory $c i64 107 (pagesize 1))) + (import "m" "mem1" (memory (;11;) i64 107)) + (memory (;12;) 57 (pagesize 1)) + (memory (;13;) 73 92 (pagesize 1)) + (memory (;14;) 0 0 (pagesize 1)) + (memory (;15;) 3 3 (pagesize 1)) + (memory (;16;) 57) + (memory (;17;) 73 92) + (memory (;18;) 0 0) + (memory (;19;) 1 1) + (memory $a i64 57 (pagesize 1)) + (memory $b i64 73 92 (pagesize 1)) + (memory $d i64 0 0 (pagesize 1)) + (memory $e i64 3 3 (pagesize 1)) + (memory $k i64 0 0) + (memory $i i64 0 0) + (memory $j i64 1 1) + (memory (;27;) i64 57) + (memory (;28;) i64 73 92) + (memory (;29;) i64 0 0) + (memory (;30;) i64 1 1) + (memory (;31;) 4294967295 (pagesize 1)) + (memory (;32;) i64 18446744073709551615 (pagesize 1)) + (memory (;33;) 65536) + (memory (;34;) i64 281474976710656) + (data (;0;) (memory 14) (i32.const 0) "") + (data (;1;) (memory 15) (i32.const 0) "xyz") + (data (;2;) (memory 18) (i32.const 0) "") + (data (;3;) (memory 19) (i32.const 0) "xyz") + (data (;4;) (memory $d) (i64.const 0) "") + (data (;5;) (memory $e) (i64.const 0) "xyz") + (data (;6;) (memory $k) (i64.const 0) "") + (data (;7;) (memory $i) (i64.const 0) "") + (data (;8;) (memory $j) (i64.const 0) "xyz") + (data (;9;) (memory 29) (i64.const 0) "") + (data (;10;) (memory 30) (i64.const 0) "xyz")) +;;; STDOUT ;;) diff --git a/test/run-roundtrip.py b/test/run-roundtrip.py index 5260ec3e..69c4596f 100755 --- a/test/run-roundtrip.py +++ b/test/run-roundtrip.py @@ -114,6 +114,7 @@ def main(args): parser.add_argument('--enable-multi-memory', action='store_true') parser.add_argument('--enable-annotations', action='store_true') parser.add_argument('--enable-code-metadata', action='store_true') + parser.add_argument('--enable-custom-page-sizes', action='store_true') parser.add_argument('--inline-exports', action='store_true') parser.add_argument('--inline-imports', action='store_true') parser.add_argument('--reloc', action='store_true') @@ -138,6 +139,7 @@ def main(args): '--enable-multi-memory': options.enable_multi_memory, '--enable-annotations': options.enable_annotations, '--enable-code-metadata': options.enable_code_metadata, + '--enable-custom-page-sizes': options.enable_custom_page_sizes, '--reloc': options.reloc, '--no-check': options.no_check, }) @@ -160,6 +162,7 @@ def main(args): '--enable-multi-memory': options.enable_multi_memory, '--enable-annotations': options.enable_annotations, '--enable-code-metadata': options.enable_code_metadata, + '--enable-custom-page-sizes': options.enable_custom_page_sizes, '--inline-exports': options.inline_exports, '--inline-imports': options.inline_imports, '--no-debug-names': not options.debug_names, diff --git a/test/spec/custom-page-sizes/custom-page-sizes-invalid.txt b/test/spec/custom-page-sizes/custom-page-sizes-invalid.txt new file mode 100644 index 00000000..3ae9fa74 --- /dev/null +++ b/test/spec/custom-page-sizes/custom-page-sizes-invalid.txt @@ -0,0 +1,63 @@ +;;; TOOL: run-interp-spec +;;; ARGS*: --enable-custom-page-sizes --enable-multi-memory +;;; STDIN_FILE: third_party/testsuite/proposals/custom-page-sizes/custom-page-sizes-invalid.wast +(;; STDOUT ;;; +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:3: assert_malformed passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.0.wat:1:21: error: malformed custom page size + (memory 0 (pagesize 3)) + ^ +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:9: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.1.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:13: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.2.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:17: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.3.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:21: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.4.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:25: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.5.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:29: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.6.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:33: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.7.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:37: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.8.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:41: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.9.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:45: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.10.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:49: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.11.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:53: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.12.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:57: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.13.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:61: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.14.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:65: assert_invalid passed: + out/test/spec/custom-page-sizes/custom-page-sizes-invalid/custom-page-sizes-invalid.15.wasm:000000e: error: only page sizes of 1 B or 64 KiB are allowed + 000000e: error: OnMemory callback failed +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:71: assert_invalid passed: + 000000e: error: malformed memory page size +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:78: assert_malformed passed: + 000000e: error: malformed memory page size +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:99: assert_unlinkable passed: + error: page_size mismatch in imported memory, expected 65536 but got 1. +out/test/spec/custom-page-sizes/custom-page-sizes-invalid.wast:106: assert_unlinkable passed: + error: page_size mismatch in imported memory, expected 1 but got 65536. +21/21 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/custom-page-sizes/custom-page-sizes.txt b/test/spec/custom-page-sizes/custom-page-sizes.txt new file mode 100644 index 00000000..7e11e710 --- /dev/null +++ b/test/spec/custom-page-sizes/custom-page-sizes.txt @@ -0,0 +1,9 @@ +;;; TOOL: run-interp-spec +;;; ARGS*: --enable-custom-page-sizes --enable-multi-memory +;;; STDIN_FILE: third_party/testsuite/proposals/custom-page-sizes/custom-page-sizes.wast +(;; STDOUT ;;; +out/test/spec/custom-page-sizes/custom-page-sizes.wast:27: assert_trap passed: out of bounds memory access: access at 0+1 >= max value 0 +out/test/spec/custom-page-sizes/custom-page-sizes.wast:34: assert_trap passed: out of bounds memory access: access at 65536+1 >= max value 65536 +out/test/spec/custom-page-sizes/custom-page-sizes.wast:41: assert_trap passed: out of bounds memory access: access at 131072+1 >= max value 131072 +34/34 tests passed. +;;; STDOUT ;;) diff --git a/test/spec/memory64/binary.txt b/test/spec/memory64/binary.txt index 28441993..e34a5f79 100644 --- a/test/spec/memory64/binary.txt +++ b/test/spec/memory64/binary.txt @@ -137,9 +137,9 @@ out/test/spec/memory64/binary.wast:633: assert_malformed passed: out/test/spec/memory64/binary.wast:651: assert_malformed passed: 000000b: error: invalid memory count 1, only 0 bytes left in section out/test/spec/memory64/binary.wast:661: assert_malformed passed: - 000000c: error: malformed memory limits flag: 8 + 000000c: error: custom page sizes not allowed out/test/spec/memory64/binary.wast:669: assert_malformed passed: - 000000c: error: malformed memory limits flag: 8 + 000000c: error: custom page sizes not allowed out/test/spec/memory64/binary.wast:678: assert_malformed passed: 000000c: error: malformed memory limits flag: 129 out/test/spec/memory64/binary.wast:687: assert_malformed passed: |