Closed Bug 1536062 Opened 5 years ago Closed 5 years ago

Dead code shouldn't abort compilation with OOM

Categories

(Core :: JavaScript: WebAssembly, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla68
Tracking Status
firefox68 --- fixed

People

(Reporter: bbouvier, Assigned: bbouvier)

Details

Attachments

(1 file)

In WasmIonCompile.cpp, the rule is that if we're in dead code, then we should return true. Returning false indicates an error, and since no explicit error message is attached, this is understood by the compiler to be an out-of-memory error.

The only real-world pain point this might cause and that I can think of is for fuzzers which will fail more than actually needed (and manual testers trying to reduce test cases).

I've checked all the uses of inDeadCode and found a few of them which were incorrect. Patch with tests incoming.

This also fixes-up a few places in text-to-binary where no error messages were
generated, resulting in incorrect out-of-memory messages.

Attachment #9051652 - Attachment description: Bug 1536062: Make sure that dead-code doesn't prevent ion compilation of wasm modules; r?jseward → Bug 1536062: Make sure that dead-code doesn't prevent ion compilation of wasm modules; r?lth
Pushed by bbouvier@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6b8fe318656
Make sure that dead-code doesn't prevent ion compilation of wasm modules; r=lth
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla68
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: