Closed
Bug 747554
Opened 12 years ago
Closed 12 years ago
"Assertion failure: script->varIsAliased(i),"
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla15
People
(Reporter: gkw, Assigned: luke)
References
Details
(Keywords: assertion, regression, testcase, Whiteboard: js-triage-needed)
Attachments
(2 files)
3.59 KB,
text/plain
|
Details | |
4.90 KB,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
(function() { switch ({ z } = gc) { case n: function e() {} var z } })() asserts js debug shell on m-c changeset 17af008937e3 without any CLI arguments at Assertion failure: script->varIsAliased(i), autoBisect shows this is probably related to the following changeset: The first bad revision is: changeset: 91357:4c298ca28fa6 user: Luke Wagner date: Fri Mar 16 12:02:37 2012 -0700 summary: Bug 740259 - Assert that dynamic binding access is expected (r=bhackett)
Assignee | ||
Comment 1•12 years ago
|
||
Ah, the root of this evil is destructuring short-hand: when we parse the 'x' in '{x} = blah', we parse 'x' as a property name. That means we don't use Parser::identifierName (like all other names) which means we never link the use to def which means we emit a dynamic name lookup for 'x' which triggers the "I thought this wasn't aliased" assertion added for ALIASEDVAR. The fix is to do the def-use linking in CheckDestructuring by sharing code with identifierName.
Comment 2•12 years ago
|
||
Comment on attachment 617156 [details] [diff] [review] fix and test Review of attachment 617156 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/frontend/Parser.cpp @@ +6684,5 @@ > #endif > ) && !(tc->flags & TCF_DECL_DESTRUCTURING)) > { > + if (!NoteNameUse(node, tc)) > + return false; NULL, you warning-introducer you.
Attachment #617156 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 3•12 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/be0709aa4730
Target Milestone: --- → mozilla15
Comment 4•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/be0709aa4730
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 5•11 years ago
|
||
A testcase for this bug was automatically identified at js/src/jit-test/tests/basic/testBug747554.js.
Flags: in-testsuite+
You need to log in
before you can comment on or make changes to this bug.
Description
•