Closed Bug 1502037 Opened 6 years ago Closed 5 years ago

Improve error messages when trying to use dropped segments

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
mozilla66
Tracking Status
firefox65 --- wontfix
firefox66 --- fixed

People

(Reporter: lth, Assigned: lth)

References

Details

Attachments

(1 file)

Supposedly active segments have been re-specified in terms of passive segment semantics, along the lines of "an active segment is equal to a mem.init + mem.drop" (ditto table) "running before the start function".  This needs to be investigated, and if there are implications for how we handle segments (eg, suppose mem.init is allowed to use an active segment for its source, then we must properly trap because that segment is gone) we must update the code.
Assignee: nobody → lhansen
Status: NEW → ASSIGNED

Pretty clean semantics here, for memory.init and here, for data.drop, with trapping behavior.

So far as I can tell, our data structures have the correct semantics for this: the instance has an array of segments for the module, in which active segments are null to begin with and passive segments become null as they are dropped. Both memory.init and data.drop consult this table, and error out (as they should) if an element is null. Active segments are stored elsewhere (presumably the module) and the "implicit memory.init + data.drop" is just window dressing really.

We can however improve the error messages.

Attachment #9038801 - Flags: review?(jseward)
Summary: Bulk memory: Track proposal changes wrt active segments → Improve error messages when trying to use dropped segments
Comment on attachment 9038801 [details] [diff] [review]
bug1502037-dropped-segment-errors.patch

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

Looks pretty uncontroversial.
Attachment #9038801 - Flags: review?(jseward) → review+
Pushed by lhansen@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/83097742e871
Better error messages when accessing dropped data/elem segments. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
See Also: → 1523081
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: