FetchStreamReader causes stack overflow when reading ReadableStream with a large queue
Categories
(Core :: DOM: Streams, defect)
Tracking
()
People
(Reporter: saschanaz, Assigned: saschanaz)
References
(Regression)
Details
(Keywords: regression)
Attachments
(1 file)
new Response(new ReadableStream({ start(c) {
for (const i of new Array(40000).fill()) {
c.enqueue(new Uint8Array(0));
}
c.close();
} })).text();
FetchStreamReader::ChunkSteps is calling OnOutputStreamReady and that calls ReadableStreamDefaultReader::ReadChunk, which then again can call ChunkSteps synchronously. The stack becomes longer as the queue becomes larger.
Updated•2 years ago
|
Comment 1•2 years ago
|
||
Set release status flags based on info from the regressing bug 1750298
:evilpie, since you are the author of the regressor, bug 1750298, could you take a look?
For more information, please visit auto_nag documentation.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 2•2 years ago
|
||
I think DOM:Streams
should be the correct component.
Comment 3•2 years ago
|
||
But shouldn't the chunk length be non-zero and some point after we start reading? I am not sure why we would re-enter so often.
Assignee | ||
Comment 4•2 years ago
|
||
new Uint8Array(0)
, that's why.
Assignee | ||
Comment 5•2 years ago
|
||
Assignee | ||
Updated•2 years ago
|
Assignee | ||
Updated•2 years ago
|
Updated•2 years ago
|
Comment 8•2 years ago
|
||
bugherder |
Comment 9•2 years ago
|
||
The patch landed in nightly and beta is affected.
:saschanaz, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- If no, please set
status-firefox112
towontfix
.
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 10•2 years ago
|
||
This is quite an edge case that I believe users won't meet in real world. I'll let it ride the train.
Updated•2 years ago
|
Description
•