|
51 | 51 | (assert_malformed (module binary "\00asm" "\01\00\00\00" "\81\01\00\01\01\00") "malformed section id")
|
52 | 52 | (assert_malformed (module binary "\00asm" "\01\00\00\00" "\ff\01\00\01\01\00") "malformed section id")
|
53 | 53 |
|
54 |
| -;; Data segment tags and memory index can have non-minimal length |
55 |
| -(module binary |
56 |
| - "\00asm" "\01\00\00\00" |
57 |
| - "\05\03\01" ;; Memory section with 1 entry |
58 |
| - "\00\00" ;; no max, minimum 0 |
59 |
| - "\0b\07\01" ;; Data section with 1 entry |
60 |
| - "\80\00" ;; Active segment, encoded with 2 bytes |
61 |
| - "\41\00\0b\00" ;; (i32.const 0) with contents "" |
62 |
| -) |
63 |
| -(module binary |
64 |
| - "\00asm" "\01\00\00\00" |
65 |
| - "\05\03\01" ;; Memory section with 1 entry |
66 |
| - "\00\00" ;; no max, minimum 0 |
67 |
| - "\0b\08\01" ;; Data section with 1 entry |
68 |
| - "\82\00" ;; Active segment, encoded with 2 bytes |
69 |
| - "\00" ;; explicit memory index |
70 |
| - "\41\00\0b\00" ;; (i32.const 0) with contents "" |
71 |
| -) |
72 |
| -(module binary |
73 |
| - "\00asm" "\01\00\00\00" |
74 |
| - "\05\03\01" ;; Memory section with 1 entry |
75 |
| - "\00\00" ;; no max, minimum 0 |
76 |
| - "\0b\09\01" ;; Data section with 1 entry |
77 |
| - "\82\00" ;; Active segment, encoded with 2 bytes |
78 |
| - "\80\00" ;; explicit memory index, encoded with 2 bytes |
79 |
| - "\41\00\0b\00" ;; (i32.const 0) with contents "" |
80 |
| -) |
81 |
| - |
82 |
| -;; Element segment tags and table index can have non-minimal length |
83 |
| -(module binary |
84 |
| - "\00asm" "\01\00\00\00" |
85 |
| - "\04\04\01" ;; Table section with 1 entry |
86 |
| - "\70\00\00" ;; no max, minimum 0, funcref |
87 |
| - "\09\07\01" ;; Element section with 1 entry |
88 |
| - "\80\00" ;; Active segment |
89 |
| - "\41\00\0b\00" ;; (i32.const 0) with no elements |
90 |
| -) |
91 |
| -(module binary |
92 |
| - "\00asm" "\01\00\00\00" |
93 |
| - "\04\04\01" ;; Table section with 1 entry |
94 |
| - "\70\00\00" ;; no max, minimum 0, funcref |
95 |
| - "\09\09\01" ;; Element section with 1 entry |
96 |
| - "\02" ;; Active segment |
97 |
| - "\80\00" ;; explicit table index, encoded with 2 bytes |
98 |
| - "\41\00\0b\00\00" ;; (i32.const 0) with no elements |
99 |
| -) |
100 |
| -(module binary |
101 |
| - "\00asm" "\01\00\00\00" |
102 |
| - "\04\04\01" ;; Table section with 1 entry |
103 |
| - "\70\00\00" ;; no max, minimum 0, funcref |
104 |
| - "\09\09\01" ;; Element section with 1 entry |
105 |
| - "\82\00" ;; Active segment, encoded with 2 bytes |
106 |
| - "\00" ;; explicit table index |
107 |
| - "\41\00\0b\00\00" ;; (i32.const 0) with no elements |
108 |
| -) |
109 |
| -(module binary |
110 |
| - "\00asm" "\01\00\00\00" |
111 |
| - "\04\04\01" ;; Table section with 1 entry |
112 |
| - "\70\00\00" ;; no max, minimum 0, funcref |
113 |
| - "\09\0a\01" ;; Element section with 1 entry |
114 |
| - "\82\00" ;; Active segment, encoded with 2 bytes |
115 |
| - "\80\00" ;; explicit table index, encoded with 2 bytes |
116 |
| - "\41\00\0b\00\00" ;; (i32.const 0) with no elements |
117 |
| -) |
118 |
| - |
119 |
| -;; Type section with signed LEB128 encoded type |
120 |
| -(assert_malformed |
121 |
| - (module binary |
122 |
| - "\00asm" "\01\00\00\00" |
123 |
| - "\01" ;; Type section id |
124 |
| - "\05" ;; Type section length |
125 |
| - "\01" ;; Types vector length |
126 |
| - "\e0\7f" ;; Malformed functype, -0x20 in signed LEB128 encoding |
127 |
| - "\00\00" |
128 |
| - ) |
129 |
| - "integer representation too long" |
130 |
| -) |
131 |
| - |
132 | 54 | ;; Function with missing end marker (between two functions)
|
133 | 55 | (assert_malformed
|
134 | 56 | (module binary
|
|
0 commit comments