@@ -113,7 +113,7 @@ print(
113
113
(module
114
114
(func (export "test")
115
115
(elem.drop 0)))
116
- "unknown table 0")
116
+ "unknown elem segment 0")
117
117
` ) ;
118
118
119
119
// table.init requires a table, minimally
@@ -133,7 +133,7 @@ print(
133
133
(func (result i32) (i32.const 0))
134
134
(func (export "test")
135
135
(elem.drop 4)))
136
- "unknown table 0 ")
136
+ "unknown elem segment 4 ")
137
137
` ) ;
138
138
139
139
// init with elem seg ix out of range
@@ -197,7 +197,7 @@ tab_test1("(elem.drop 2)", 0,
197
197
198
198
// init with elem seg ix indicating an active segment
199
199
tab_test1 ( "(table.init 2 (i32.const 12) (i32.const 1) (i32.const 1))" , 0 ,
200
- "out of bounds" ) ;
200
+ "out of bounds table access " ) ;
201
201
202
202
// init, using an elem seg ix more than once is OK
203
203
tab_test2 (
@@ -213,15 +213,15 @@ tab_test2("(elem.drop 1)",
213
213
// drop, then init
214
214
tab_test2 ( "(elem.drop 1)" ,
215
215
"(table.init 1 (i32.const 12) (i32.const 1) (i32.const 1))" ,
216
- "out of bounds" ) ;
216
+ "out of bounds table access " ) ;
217
217
218
218
// init: seg ix is valid passive, but length to copy > len of seg
219
219
tab_test1 ( "(table.init 1 (i32.const 12) (i32.const 0) (i32.const 5))" , 0 ,
220
- "out of bounds" ) ;
220
+ "out of bounds table access " ) ;
221
221
222
222
// init: seg ix is valid passive, but implies copying beyond end of seg
223
223
tab_test1 ( "(table.init 1 (i32.const 12) (i32.const 2) (i32.const 3))" , 0 ,
224
- "out of bounds" ) ;
224
+ "out of bounds table access " ) ;
225
225
226
226
// Tables are of different length with t1 shorter than t0, to test that we're not
227
227
// using t0's limit for t1's bound
@@ -230,7 +230,7 @@ for ( let [table, oobval] of [[0,30],[1,28]] ) {
230
230
// init: seg ix is valid passive, but implies copying beyond end of dst
231
231
tab_test1 ( `(table.init $t${ table } 1 (i32.const ${ oobval - 2 } ) (i32.const 1) (i32.const 3))` ,
232
232
table ,
233
- "out of bounds" ) ;
233
+ "out of bounds table access " ) ;
234
234
235
235
// init: seg ix is valid passive, zero len, and src offset out of bounds at the
236
236
// end of the table - this is allowed
@@ -242,7 +242,7 @@ for ( let [table, oobval] of [[0,30],[1,28]] ) {
242
242
// end of the table - this is not allowed
243
243
tab_test1 ( `(table.init $t${ table } 1 (i32.const 12) (i32.const 5) (i32.const 0))` ,
244
244
table ,
245
- "out of bounds" ) ;
245
+ "out of bounds table access " ) ;
246
246
247
247
// init: seg ix is valid passive, zero len, and dst offset out of bounds at the
248
248
// end of the table - this is allowed
@@ -254,7 +254,7 @@ for ( let [table, oobval] of [[0,30],[1,28]] ) {
254
254
// end of the table - this is not allowed
255
255
tab_test1 ( `(table.init $t${ table } 1 (i32.const ${ oobval + 1 } ) (i32.const 2) (i32.const 0))` ,
256
256
table ,
257
- "out of bounds" ) ;
257
+ "out of bounds table access " ) ;
258
258
259
259
// init: seg ix is valid passive, zero len, and dst and src offsets out of bounds
260
260
// at the end of the table - this is allowed
@@ -266,7 +266,7 @@ for ( let [table, oobval] of [[0,30],[1,28]] ) {
266
266
// end of the table - this is not allowed
267
267
tab_test1 ( `(table.init $t${ table } 1 (i32.const ${ oobval + 1 } ) (i32.const 5) (i32.const 0))` ,
268
268
table ,
269
- "out of bounds" ) ;
269
+ "out of bounds table access " ) ;
270
270
}
271
271
272
272
// invalid argument types
@@ -338,7 +338,7 @@ function tbl_init(min, max, backup, write, segoffs=0) {
338
338
// A fill reading past the end of the segment should throw *and* have filled
339
339
// table with as much data as was available.
340
340
let offs = min - backup ;
341
- print ( `(assert_trap (invoke "run" (i32.const ${ offs } ) (i32.const ${ write } )) "out of bounds")` ) ;
341
+ print ( `(assert_trap (invoke "run" (i32.const ${ offs } ) (i32.const ${ write } )) "out of bounds table access ")` ) ;
342
342
for ( let i = 0 ; i < min ; i ++ ) {
343
343
print ( `(assert_trap (invoke "test" (i32.const ${ i } )) "uninitialized element")` ) ;
344
344
}
@@ -383,5 +383,4 @@ print(
383
383
(elem funcref) (elem funcref) (elem funcref) (elem funcref)
384
384
(elem funcref) (elem funcref) (elem funcref) (elem funcref)
385
385
(elem funcref)
386
- (func (table.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))
387
- ` )
386
+ (func (table.init 64 (i32.const 0) (i32.const 0) (i32.const 0))))` )
0 commit comments