| 1 |
{ |
| 2 |
"source_filename": "tests/testsuite/proposals/wasm-3.0/imports1.wast", |
| 3 |
"commands": [ |
| 4 |
{ |
| 5 |
"type": "module", |
| 6 |
"line": 1, |
| 7 |
"filename": "imports1.0.wasm", |
| 8 |
"module_type": "binary" |
| 9 |
}, |
| 10 |
{ |
| 11 |
"type": "assert_return", |
| 12 |
"line": 12, |
| 13 |
"action": { |
| 14 |
"type": "invoke", |
| 15 |
"field": "load", |
| 16 |
"args": [ |
| 17 |
{ |
| 18 |
"type": "i32", |
| 19 |
"value": "0" |
| 20 |
} |
| 21 |
] |
| 22 |
}, |
| 23 |
"expected": [ |
| 24 |
{ |
| 25 |
"type": "i32", |
| 26 |
"value": "0" |
| 27 |
} |
| 28 |
] |
| 29 |
}, |
| 30 |
{ |
| 31 |
"type": "assert_return", |
| 32 |
"line": 13, |
| 33 |
"action": { |
| 34 |
"type": "invoke", |
| 35 |
"field": "load", |
| 36 |
"args": [ |
| 37 |
{ |
| 38 |
"type": "i32", |
| 39 |
"value": "10" |
| 40 |
} |
| 41 |
] |
| 42 |
}, |
| 43 |
"expected": [ |
| 44 |
{ |
| 45 |
"type": "i32", |
| 46 |
"value": "16" |
| 47 |
} |
| 48 |
] |
| 49 |
}, |
| 50 |
{ |
| 51 |
"type": "assert_return", |
| 52 |
"line": 14, |
| 53 |
"action": { |
| 54 |
"type": "invoke", |
| 55 |
"field": "load", |
| 56 |
"args": [ |
| 57 |
{ |
| 58 |
"type": "i32", |
| 59 |
"value": "8" |
| 60 |
} |
| 61 |
] |
| 62 |
}, |
| 63 |
"expected": [ |
| 64 |
{ |
| 65 |
"type": "i32", |
| 66 |
"value": "1048576" |
| 67 |
} |
| 68 |
] |
| 69 |
}, |
| 70 |
{ |
| 71 |
"type": "assert_trap", |
| 72 |
"line": 15, |
| 73 |
"action": { |
| 74 |
"type": "invoke", |
| 75 |
"field": "load", |
| 76 |
"args": [ |
| 77 |
{ |
| 78 |
"type": "i32", |
| 79 |
"value": "1000000" |
| 80 |
} |
| 81 |
] |
| 82 |
}, |
| 83 |
"text": "out of bounds memory access" |
| 84 |
} |
| 85 |
] |
| 86 |
} |