Closed Bug 1503399 Opened 6 years ago Closed 6 years ago

Investigate possible assertion failure: UnwrapReaderFromStreamNoThrow(stream) == reader in ReadableStreamReaderGenericRelease

Categories

(Core :: JavaScript Engine, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: jorendorff, Assigned: jorendorff)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

There is indeed an invariant in the standard that streams and readers have slots that point to each other.

But in our implementation, those edges can be CCWs and they can be killed individually. We can probably get this assertion to fail by nuking the Stream's CCW that points to the Reader, but not the Reader's CCW that points to the Stream.
Priority: -- → P3
Blocks: streams-ship
Yep.

let g = newGlobal();
let stream = new ReadableStream({});
g.stream = stream;
g.eval("var reader = ReadableStream.prototype.getReader.call(stream);");
nukeCCW(g.reader);
g.eval("reader.releaseLock();");

Assertion failure: UnwrapReaderFromStreamNoThrow(unwrappedStream) == unwrappedReader, at /Users/jorendorff/work/gecko/js/src/builtin/Stream.cpp:1983
Segmentation fault: 11
Priority: P3 → P1
Assignee: nobody → jorendorff
Pushed by jorendorff@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c4de0c7b78ed
Weaken assertion to allow for stream.[[reader]] being a dead object. r=jwalden
https://hg.mozilla.org/mozilla-central/rev/c4de0c7b78ed
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: