Closed Bug 1627987 Opened 6 years ago Closed 6 years ago

Emit RuntimeError for table out-of-bounds

Categories

(Core :: JavaScript: WebAssembly, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla77
Tracking Status
firefox77 --- fixed

People

(Reporter: rhunt, Assigned: rhunt)

References

Details

Attachments

(1 file)

JSMSG_WASM_TABLE_OUT_OF_BOUNDS should emit a RuntimeError as the wasm spec specifies this as a trap. This was observed in the reference-types spec test suite.

We currently emit a RangeError for table out-of-bounds conditions. All table
instructions are specified to emit traps on out-of-bounds [1], which are
converted to RuntimeError by the JS API [2].

This was found in a newer version of the reference-types spec tests.

[1] https://webassembly.github.io/reference-types/core/exec/instructions.html
[2] https://webassembly.github.io/spec/js-api/index.html#exported-function-exotic-objects

Pushed by rhunt@eqrion.net: https://hg.mozilla.org/integration/autoland/rev/40ff6069754d Emit RuntimeError for table out-of-bounds. r=lth
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla77
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: