Last Comment Bug 776314 - "Assertion failure: src->length() > 0 && chars[0] == '(',"
: "Assertion failure: src->length() > 0 && chars[0] == '(',"
Status: RESOLVED FIXED
[js:t]
: assertion, regression, testcase
Product: Core
Classification: Components
Component: JavaScript Engine (show other bugs)
: Trunk
: x86_64 Mac OS X
: -- critical (vote)
: mozilla17
Assigned To: :Benjamin Peterson
: general
: Jason Orendorff [:jorendorff]
Mentors:
: 776315 (view as bug list)
Depends on:
Blocks: jsfunfuzz savesource
  Show dependency treegraph
 
Reported: 2012-07-21 21:30 PDT by Gary Kwong [:gkw] [:nth10sd]
Modified: 2013-01-19 14:00 PST (History)
7 users (show)
choller: in‑testsuite+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
stack (5.11 KB, text/plain)
2012-07-21 21:30 PDT, Gary Kwong [:gkw] [:nth10sd]
no flags Details
add an generator expression flag to scripts (5.64 KB, patch)
2012-07-23 18:48 PDT, :Benjamin Peterson
luke: review+
Details | Diff | Splinter Review
stub out genexp toSource calls (1.52 KB, patch)
2012-07-23 18:48 PDT, :Benjamin Peterson
luke: review+
Details | Diff | Splinter Review

Description Gary Kwong [:gkw] [:nth10sd] 2012-07-21 21:30:16 PDT
Created attachment 644717 [details]
stack

disassemble(eval(("(function(){(a for each (e in b));})")));

asserts js debug shell on m-c changeset defbe00ca091 without any CLI arguments at Assertion failure: src->length() > 0 && chars[0] == '(',
Comment 1 Gary Kwong [:gkw] [:nth10sd] 2012-07-21 21:38:36 PDT
autoBisect shows this is probably related to the following changeset:

The first bad revision is:
changeset:   99950:e080642175e6
user:        Benjamin Peterson
date:        Fri Jul 20 20:17:38 2012 +0200
summary:     Bug 761723 - Save script sources to implement Function.prototype.toString. r=jorendorff,njn,jimb,jst,Ms2ger
Comment 2 :Benjamin Peterson 2012-07-21 23:05:59 PDT
What do people think toSource() of a generator expression should be?
Comment 3 :Benjamin Peterson 2012-07-22 08:54:09 PDT
*** Bug 776315 has been marked as a duplicate of this bug. ***
Comment 4 :Benjamin Peterson 2012-07-23 18:48:08 PDT
Created attachment 645168 [details] [diff] [review]
add an generator expression flag to scripts
Comment 5 :Benjamin Peterson 2012-07-23 18:48:39 PDT
Created attachment 645169 [details] [diff] [review]
stub out genexp toSource calls
Comment 6 Luke Wagner [:luke] 2012-07-24 11:00:44 PDT
Comment on attachment 645169 [details] [diff] [review]
stub out genexp toSource calls

>+    if (isInterpreted() && script()->isGeneratorExp) {
>+        if ((!bodyOnly && !out.append("function genexp() {")) ||
>+            !out.append("\n    [generator expression]\n") ||
>+            (!bodyOnly && !out.append("}")))
>+            return NULL;
>+        return out.finishString();

Multi-line conditional needs braced then-branch.
Comment 9 Christian Holler (:decoder) 2013-01-19 14:00:22 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.