Closed
Bug 1364608
Opened 7 years ago
Closed 5 years ago
Stash rval in AsyncIteratorClose
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: shu, Assigned: shu)
References
Details
(Keywords: triage-deferred)
Attachments
(1 file)
2.36 KB,
patch
|
arai
:
review+
|
Details | Diff | Splinter Review |
AsyncIteratorClose awaits the result of calling iter.return(). This clobbers rval, which results in crashes when performing AsyncIteratorClose due to "return" in for-await-of. Test case courtesy of leobalter: let iter = function* () { yield 42; yield 43; }() async function *fn() { for await (let [...x] of [iter]) { return; } } fn().next().then(_ => print("resolved"), _ => print("rejected"))
Assignee | ||
Comment 1•7 years ago
|
||
Attachment #8867405 -
Flags: review?(arai.unmht)
Comment 2•7 years ago
|
||
Comment on attachment 8867405 [details] [diff] [review] Stash rval in AsyncIteratorClose. Review of attachment 8867405 [details] [diff] [review]: ----------------------------------------------------------------- thanks!
Attachment #8867405 -
Flags: review?(arai.unmht) → review+
Comment 3•7 years ago
|
||
Thanks for this patch! While I'm not familiar with the patch code, I can tell the test captures the bug well. I'll write a quick Test262 test for it to make sure this is captured. Test262 is not yet 100% covered for for-await-of, so it's good if I already add this part, anyway.
Flags: needinfo?(shu)
Assignee | ||
Comment 4•7 years ago
|
||
(In reply to Leo Balter from comment #3) > Thanks for this patch! While I'm not familiar with the patch code, I can > tell the test captures the bug well. > > I'll write a quick Test262 test for it to make sure this is captured. > > Test262 is not yet 100% covered for for-await-of, so it's good if I already > add this part, anyway. Sure, please add a test262 test.
Flags: needinfo?(shu)
Assignee | ||
Comment 5•7 years ago
|
||
I'll commit the testcase to test262/local in the meantime and wait for you to do the upstream test262 PR.
Assignee | ||
Updated•7 years ago
|
Assignee: nobody → shu
Comment 6•7 years ago
|
||
Cool, you can use the tests from this PR. I'm planning a new sync tomorrow in the morning, if that's ok. If we have the local files, it's gonna be just about replacing them, otherwise I'll add the tests to the skip list.
Comment 7•7 years ago
|
||
I forgot to link the PR: https://github.com/tc39/test262/pull/1036/files
Assignee | ||
Comment 9•7 years ago
|
||
Going to land in the meantime because of becoming a fuzzblocker due to recent test262 sync Marking leave-open as until [1] is resolved we still have to skip some tests. [1] https://github.com/tc39/test262/issues/1043
Assignee | ||
Updated•7 years ago
|
Keywords: leave-open
Comment 10•7 years ago
|
||
Pushed by shu@rfrn.org: https://hg.mozilla.org/integration/mozilla-inbound/rev/8084d6ac8a07 Stash rval in AsyncIteratorClose. (r=arai)
autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: https://hg.mozilla.org/mozilla-central/rev/0b11639e4085 user: Tooru Fujisawa date: Mon Mar 27 23:20:19 2017 +0900 summary: Bug 1331092 - Part 9: Implement for-await-of. r=shu The dupe bug 1366399 had this regression range.
Comment 12•7 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8084d6ac8a07
Updated•7 years ago
|
Keywords: triage-deferred
Priority: -- → P3
Comment 13•6 years ago
|
||
Removing the leave-open flag because the blocker mentioned in comment #9 has been resolved.
Keywords: leave-open
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•