Improve error messages when trying to use dropped segments

RESOLVED FIXED in Firefox 66

Status

()

enhancement
P3
normal
RESOLVED FIXED
9 months ago
6 months ago

People

(Reporter: lth, Assigned: lth)

Tracking

(Blocks 1 bug)

Trunk
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox65 wontfix, firefox66 fixed)

Details

Attachments

(1 attachment)

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.

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: 6 months 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.