Closed
Bug 1066414
Opened 12 years ago
Closed 12 years ago
Assertion failure: opn->isArity(PN_NAME), at frontend/ParseNode.cpp
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla35
| Tracking | Status | |
|---|---|---|
| firefox35 | --- | affected |
People
(Reporter: gkw, Assigned: Swatinem)
References
Details
(Keywords: assertion, regression, testcase, Whiteboard: [jsbugmon:update])
Attachments
(2 files)
|
5.14 KB,
text/plain
|
Details | |
|
1.53 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
for (var [...y] in Object) {}
asserts js debug shell on m-c changeset bc7deafdac4b without any CLI flags at Assertion failure: opn->isArity(PN_NAME), at frontend/ParseNode.cpp.
Debug configure flags:
CC="clang -Qunused-arguments" CXX="clang++ -Qunused-arguments" AR=ar sh /Users/skywalker/trees/mozilla-central/js/src/configure --target=x86_64-apple-darwin12.5.0 --enable-debug --enable-optimize --enable-nspr-build --enable-more-deterministic --with-ccache --enable-gczeal --enable-debug-symbols --disable-tests
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/5c2363e6e9ad
user: Arpad Borsos
date: Fri Aug 22 10:16:58 2014 +0200
summary: Bug 933276 - Implement [...x] in assignment target (spread operator); r=jorendorff
Jason, is bug 933276 a possible regressor?
Flags: needinfo?(jorendorff)
| Assignee | ||
Comment 1•12 years ago
|
||
That might as well be the cause. I will take a look.
A call stack would be helpful though.
| Reporter | ||
Comment 2•12 years ago
|
||
Oops, forgot the stack, so here it is for m-c rev 2db5b64f6d49.
| Assignee | ||
Comment 3•12 years ago
|
||
Interesting. The stack does not include any of the functions I touched.
Is it that cloneLeftHandSide simply can’t deal with the new rest syntax (yet?).
I’ll take a look.
| Assignee | ||
Comment 4•12 years ago
|
||
This fixes the assert at least. Still need to figure out what the
correct behavior here is. for (var [...x] in [1,2,3]) yields "2" for x.
Need to read up in the spec on this.
Attachment #8488515 -
Flags: review?(jorendorff)
| Assignee | ||
Updated•12 years ago
|
Assignee: nobody → arpad.borsos
Status: NEW → ASSIGNED
| Assignee | ||
Comment 5•12 years ago
|
||
meh, the code is indeed correct. A string is iterable (since when? I haven’t seen that before), so it yields an array with each char.
If you want, I can add tests for that.
Comment 6•12 years ago
|
||
Comment on attachment 8488515 [details] [diff] [review]
part1: fix assertion
Review of attachment 8488515 [details] [diff] [review]:
-----------------------------------------------------------------
Nicely done, thank you.
Attachment #8488515 -
Flags: review?(jorendorff) → review+
Updated•12 years ago
|
Flags: needinfo?(jorendorff)
Comment 7•12 years ago
|
||
(In reply to Arpad Borsos (Swatinem) from comment #5)
> meh, the code is indeed correct. A string is iterable (since when? I haven’t
> seen that before), so it yields an array with each char.
Right. This changed in rev 26:
https://bugs.ecmascript.org/show_bug.cgi?id=2884
but I think we implemented it that way before it was technically correct to do so...
> If you want, I can add tests for that.
Sounds good! Passing tests are always welcome. :)
| Assignee | ||
Comment 8•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b4735c318a46
This includes some additional tests.
Comment 9•12 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in
before you can comment on or make changes to this bug.
Description
•