Last Comment Bug 773927 - "Assertion failure: dn->isClosed(),"
: "Assertion failure: dn->isClosed(),"
Status: RESOLVED FIXED
: assertion, regression, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 Mac OS X
: -- critical (vote)
: mozilla17
Assigned To: Luke Wagner [:luke]
: general
: Jason Orendorff [:jorendorff]
Mentors:
Depends on:
Blocks: jsfunfuzz 771039
  Show dependency treegraph
 
Reported: 2012-07-14 01:00 PDT by Gary Kwong [:gkw] [:nth10sd]
Modified: 2013-01-14 08:35 PST (History)
5 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
stack (8.42 KB, text/plain)
2012-07-14 01:00 PDT, Gary Kwong [:gkw] [:nth10sd]
no flags Details
fix and test (1.50 KB, patch)
2012-07-16 12:01 PDT, Luke Wagner [:luke]
dvander: review+
Details | Diff | Splinter Review

Description Gary Kwong [:gkw] [:nth10sd] 2012-07-14 01:00:29 PDT
Created attachment 642188 [details]
stack

(function() {x})
((function() {x}) for (x in 2))

asserts js debug shell on m-c changeset 32c911bc2579 without any CLI arguments, but only when the testcase is passed in as a CLI parameter at Assertion failure: dn->isClosed(),

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   99089:b790407d394f
user:        Luke Wagner
date:        Thu Jul 05 20:29:24 2012 -0700
summary:     Bug 771039 - assert some invariants in BindNameToSlot (r=dvander)
Comment 1 Luke Wagner [:luke] 2012-07-16 12:01:55 PDT
Created attachment 642673 [details] [diff] [review]
fix and test

More pre-existing bugs in the genexpr CompExprTransplanter code:

So, before we know this is a genexpr, both (function() {x}) lambdas have finished parsing and share the same placeholder binding node in the enclosing (global) scope.  Then we see the second statement is a genexpr so we must transplant the use of 'x' to have a new placeholder.  To do this we make a new placeholder, but we lose the fact that the old placeholder was aliased so that when we convert the placeholder to a real binding (the 'x' in for(x in [0,1])), the definition isn't marked as closed.
Comment 3 Ed Morley [:emorley] 2012-07-17 02:11:16 PDT
https://hg.mozilla.org/mozilla-central/rev/2958d924acc6
Comment 4 Christian Holler (:decoder) 2013-01-14 08:35:59 PST
A testcase for this bug was automatically identified at js/src/jit-test/tests/basic/testBug773927.js.

Note You need to log in before you can comment on or make changes to this bug.