Last Comment Bug 780405 - "Assertion failure: strictModeState != StrictMode::UNKNOWN,"
: "Assertion failure: strictModeState != StrictMode::UNKNOWN,"
Status: RESOLVED FIXED
: assertion, regression, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86 All
: -- critical (vote)
: mozilla17
Assigned To: :Benjamin Peterson
: general
Mentors:
Depends on: 790424
Blocks: jsfunfuzz 769072
  Show dependency treegraph
 
Reported: 2012-08-04 11:27 PDT by Gary Kwong [:gkw] [:nth10sd]
Modified: 2013-01-19 14:21 PST (History)
6 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
stack (10.66 KB, text/plain)
2012-08-04 11:27 PDT, Gary Kwong [:gkw] [:nth10sd]
no flags Details
set funbox->kids in LeaveFunction (2.79 KB, patch)
2012-08-04 16:35 PDT, :Benjamin Peterson
jorendorff: review+
Details | Diff | Splinter Review

Description Gary Kwong [:gkw] [:nth10sd] 2012-08-04 11:27:55 PDT
Created attachment 649018 [details]
stack

function n(b = ((function() {}), function() {
    (a for (r in [function() {}]))
})) {}

asserts js debug shell on m-c changeset 0f66a7ecf8de without any CLI arguments at Assertion failure: strictModeState != StrictMode::UNKNOWN,

autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   100567:418ad69cfe52
user:        Benjamin Peterson
date:        Mon Jul 09 23:43:06 2012 -0700
summary:     Bug 769072: retroactively apply strict mode to defaults. r=njn
Comment 1 :Benjamin Peterson 2012-08-04 16:35:41 PDT
Created attachment 649041 [details] [diff] [review]
set funbox->kids in LeaveFunction

Jason, I'm giving this to you since njn is gone.
Comment 2 Jason Orendorff [:jorendorff] 2012-08-07 07:52:42 PDT
Comment on attachment 649041 [details] [diff] [review]
set funbox->kids in LeaveFunction

Review of attachment 649041 [details] [diff] [review]:
-----------------------------------------------------------------

Oh, I see. It's because generatorExpr() wasn't setting ->kids?

The comment on LeaveFunction() says it isn't called for functions created using the Function constructor. Test that too?

This is an improvement, so r=me, but feel free to revise it anyway and request review again.
Comment 3 :Benjamin Peterson 2012-08-07 09:40:39 PDT
(In reply to Jason Orendorff [:jorendorff] from comment #2)
> Comment on attachment 649041 [details] [diff] [review]
> set funbox->kids in LeaveFunction
> 
> Review of attachment 649041 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Oh, I see. It's because generatorExpr() wasn't setting ->kids?

Yes, so when we went to set strict mode to STRICT on it, its children were unreachable.

> 
> The comment on LeaveFunction() says it isn't called for functions created
> using the Function constructor. Test that too?

You can't have Function() lexically nested in defaults the way you can genexps.

> 
> This is an improvement, so r=me, but feel free to revise it anyway and
> request review again.

What's the revision you're looking for?
Comment 4 Jason Orendorff [:jorendorff] 2012-08-07 13:34:39 PDT
(In reply to Benjamin Peterson from comment #3)
> > The comment on LeaveFunction() says it isn't called for functions created
> > using the Function constructor. Test that too?
> 
> You can't have Function() lexically nested in defaults the way you can
> genexps.

OK.

> What's the revision you're looking for?

None, carry on.
Comment 6 Ed Morley [:emorley] 2012-08-08 09:33:13 PDT
https://hg.mozilla.org/mozilla-central/rev/84739a192aa9
Comment 7 Christian Holler (:decoder) 2013-01-19 14:21:42 PST
Automatically extracted testcase for this bug was committed:

https://hg.mozilla.org/mozilla-central/rev/efaf8960a929

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