wa-lang.org/wazero@v1.0.2/internal/integration_test/spectest/v1/testdata/traps.json (about) 1 {"source_filename": "./traps.wast", 2 "commands": [ 3 {"type": "module", "line": 5, "filename": "traps.0.wasm"}, 4 {"type": "assert_trap", "line": 16, "action": {"type": "invoke", "field": "no_dce.i32.div_s", "args": [{"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 5 {"type": "assert_trap", "line": 17, "action": {"type": "invoke", "field": "no_dce.i32.div_u", "args": [{"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 6 {"type": "assert_trap", "line": 18, "action": {"type": "invoke", "field": "no_dce.i64.div_s", "args": [{"type": "i64", "value": "1"}, {"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 7 {"type": "assert_trap", "line": 19, "action": {"type": "invoke", "field": "no_dce.i64.div_u", "args": [{"type": "i64", "value": "1"}, {"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 8 {"type": "assert_trap", "line": 20, "action": {"type": "invoke", "field": "no_dce.i32.div_s", "args": [{"type": "i32", "value": "2147483648"}, {"type": "i32", "value": "4294967295"}]}, "text": "integer overflow", "expected": []}, 9 {"type": "assert_trap", "line": 21, "action": {"type": "invoke", "field": "no_dce.i64.div_s", "args": [{"type": "i64", "value": "9223372036854775808"}, {"type": "i64", "value": "18446744073709551615"}]}, "text": "integer overflow", "expected": []}, 10 {"type": "module", "line": 23, "filename": "traps.1.wasm"}, 11 {"type": "assert_trap", "line": 34, "action": {"type": "invoke", "field": "no_dce.i32.rem_s", "args": [{"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 12 {"type": "assert_trap", "line": 35, "action": {"type": "invoke", "field": "no_dce.i32.rem_u", "args": [{"type": "i32", "value": "1"}, {"type": "i32", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 13 {"type": "assert_trap", "line": 36, "action": {"type": "invoke", "field": "no_dce.i64.rem_s", "args": [{"type": "i64", "value": "1"}, {"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 14 {"type": "assert_trap", "line": 37, "action": {"type": "invoke", "field": "no_dce.i64.rem_u", "args": [{"type": "i64", "value": "1"}, {"type": "i64", "value": "0"}]}, "text": "integer divide by zero", "expected": []}, 15 {"type": "module", "line": 39, "filename": "traps.2.wasm"}, 16 {"type": "assert_trap", "line": 50, "action": {"type": "invoke", "field": "no_dce.i32.trunc_f32_s", "args": [{"type": "f32", "value": "2143289344"}]}, "text": "invalid conversion to integer", "expected": []}, 17 {"type": "assert_trap", "line": 51, "action": {"type": "invoke", "field": "no_dce.i32.trunc_f32_u", "args": [{"type": "f32", "value": "2143289344"}]}, "text": "invalid conversion to integer", "expected": []}, 18 {"type": "assert_trap", "line": 52, "action": {"type": "invoke", "field": "no_dce.i32.trunc_f64_s", "args": [{"type": "f64", "value": "9221120237041090560"}]}, "text": "invalid conversion to integer", "expected": []}, 19 {"type": "assert_trap", "line": 53, "action": {"type": "invoke", "field": "no_dce.i32.trunc_f64_u", "args": [{"type": "f64", "value": "9221120237041090560"}]}, "text": "invalid conversion to integer", "expected": []}, 20 {"type": "assert_trap", "line": 54, "action": {"type": "invoke", "field": "no_dce.i64.trunc_f32_s", "args": [{"type": "f32", "value": "2143289344"}]}, "text": "invalid conversion to integer", "expected": []}, 21 {"type": "assert_trap", "line": 55, "action": {"type": "invoke", "field": "no_dce.i64.trunc_f32_u", "args": [{"type": "f32", "value": "2143289344"}]}, "text": "invalid conversion to integer", "expected": []}, 22 {"type": "assert_trap", "line": 56, "action": {"type": "invoke", "field": "no_dce.i64.trunc_f64_s", "args": [{"type": "f64", "value": "9221120237041090560"}]}, "text": "invalid conversion to integer", "expected": []}, 23 {"type": "assert_trap", "line": 57, "action": {"type": "invoke", "field": "no_dce.i64.trunc_f64_u", "args": [{"type": "f64", "value": "9221120237041090560"}]}, "text": "invalid conversion to integer", "expected": []}, 24 {"type": "module", "line": 59, "filename": "traps.3.wasm"}, 25 {"type": "assert_trap", "line": 78, "action": {"type": "invoke", "field": "no_dce.i32.load", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 26 {"type": "assert_trap", "line": 79, "action": {"type": "invoke", "field": "no_dce.i32.load16_s", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 27 {"type": "assert_trap", "line": 80, "action": {"type": "invoke", "field": "no_dce.i32.load16_u", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 28 {"type": "assert_trap", "line": 81, "action": {"type": "invoke", "field": "no_dce.i32.load8_s", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 29 {"type": "assert_trap", "line": 82, "action": {"type": "invoke", "field": "no_dce.i32.load8_u", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 30 {"type": "assert_trap", "line": 83, "action": {"type": "invoke", "field": "no_dce.i64.load", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 31 {"type": "assert_trap", "line": 84, "action": {"type": "invoke", "field": "no_dce.i64.load32_s", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 32 {"type": "assert_trap", "line": 85, "action": {"type": "invoke", "field": "no_dce.i64.load32_u", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 33 {"type": "assert_trap", "line": 86, "action": {"type": "invoke", "field": "no_dce.i64.load16_s", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 34 {"type": "assert_trap", "line": 87, "action": {"type": "invoke", "field": "no_dce.i64.load16_u", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 35 {"type": "assert_trap", "line": 88, "action": {"type": "invoke", "field": "no_dce.i64.load8_s", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 36 {"type": "assert_trap", "line": 89, "action": {"type": "invoke", "field": "no_dce.i64.load8_u", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 37 {"type": "assert_trap", "line": 90, "action": {"type": "invoke", "field": "no_dce.f32.load", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}, 38 {"type": "assert_trap", "line": 91, "action": {"type": "invoke", "field": "no_dce.f64.load", "args": [{"type": "i32", "value": "65536"}]}, "text": "out of bounds memory access", "expected": []}]}