Closed Bug 1290421 Opened 8 years ago Closed 8 years ago

wasm: Throw on OOB at the MIR graph level if we know we will

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox50 --- affected
firefox51 --- fixed

People

(Reporter: bbouvier, Assigned: bbouvier)

References

Details

Attachments

(1 file)

Attached patch throw-oob.patchSplinter Review
This:
- renames MAsmThrowUnreachable to MWasmTrap, gives it a wasm::Trap parameter.
- uses it to throw on a memory access if the offset is > INT32_MAX, at the MIR graph level, simplifying slightly WasmLoad/Store/BoundsCheck codegen.
Attachment #8775916 - Flags: review?(sunfish)
Summary: wasm: Throw at the MIR graph level if we know we will → wasm: Throw on OOB at the MIR graph level if we know we will
Comment on attachment 8775916 [details] [diff] [review]
throw-oob.patch

Review of attachment 8775916 [details] [diff] [review]:
-----------------------------------------------------------------

Hopefully we won't see a lot of code with statically out-of-bounds memory accesses, of course :-).
Attachment #8775916 - Flags: review?(sunfish) → review+
The patch for bug 1293312 is adding another place that this patch will want to cover.
Thanks for the heads-up!
Pushed by bbouvier@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/019c4896543a
Throw ahead of time on statically known out-of-bounds; r=sunfish
https://hg.mozilla.org/mozilla-central/rev/019c4896543a
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: