Closed
Bug 350279
Opened 18 years ago
Closed 18 years ago
"Assertion failure: left->pn_type == TOK_RC" [@ CheckDestructuring]
Categories
(Core :: JavaScript Engine, defect, P2)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: brendan)
Details
(Keywords: crash, testcase, verified1.8.1)
Crash Data
Attachments
(1 file, 1 obsolete file)
2.13 KB,
patch
|
mrbkap
:
review+
beltzner
:
approval1.8.1+
|
Details | Diff | Splinter Review |
javascript:let [2 for (x in [])] = 4; Assertion failure: left->pn_type == TOK_RC, at jsparse.c:2121
Assignee | ||
Comment 1•18 years ago
|
||
Comment 2•18 years ago
|
||
Maybe the nearby "goto no_var_name" thing nearby should handle jumping out more like this does?
Assignee | ||
Comment 3•18 years ago
|
||
(In reply to comment #2) > Maybe the nearby "goto no_var_name" thing nearby should handle jumping out more > like this does? That case shares code at no_var_name with other downward gotos on error. This new case is unique. Therefore there is nothing more to share than via label bad. /be
Comment 4•18 years ago
|
||
Comment on attachment 237044 [details] [diff] [review] fix >Index: jsparse.c > fpvd.table.ops = NULL; > lhs = left->pn_head; >+ if (left->pn_type == TOK_ARRAYCOMP) { >+ js_ReportCompileErrorNumber(cx, left, JSREPORT_PN | JSREPORT_ERROR, >+ JSMSG_ARRAY_COMP_LEFTSIDE); >+ goto bad; >+ } > ... > out: > if (fpvd.table.ops) > JS_DHashTableFinish(&fpvd.table); I don't really see why we need to goto out: here. return JS_FALSE seems like it would be just as correct and avoid the additional label and double-goto. r=mrbkap either way.
Attachment #237044 -
Flags: review?(mrbkap) → review+
Assignee | ||
Comment 5•18 years ago
|
||
Good point, we can check for this error right away. No need to partake of the out: code that other paths through no_var_name: need for cleanup. /be
Attachment #237044 -
Attachment is obsolete: true
Attachment #237059 -
Flags: review?(mrbkap)
Assignee | ||
Updated•18 years ago
|
Attachment #237044 -
Flags: review+
Updated•18 years ago
|
Attachment #237059 -
Flags: review?(mrbkap) → review+
Assignee | ||
Updated•18 years ago
|
Attachment #237059 -
Flags: review?
Assignee | ||
Comment 6•18 years ago
|
||
Fixed on trunk. /be
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
OS: Mac OS X 10.4 → All
Priority: -- → P2
Hardware: Macintosh → All
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8.1
Updated•18 years ago
|
Attachment #237059 -
Flags: review?
Assignee | ||
Comment 7•18 years ago
|
||
Comment on attachment 237059 [details] [diff] [review] fix, v2 This assertion catches a missing error check, which becomes a crash in release builds. Safe fix, no point in risking anything by not taking it even if we didn't care about the crash instead of an error message. /be
Attachment #237059 -
Flags: approval1.8.1?
Comment 8•18 years ago
|
||
Checking in regress-350279.js; /cvsroot/mozilla/js/tests/js1_7/block/regress-350279.js,v <-- regress-350279.js initial revision: 1.1
Flags: in-testsuite+
Comment 9•18 years ago
|
||
Comment on attachment 237059 [details] [diff] [review] fix, v2 a=beltzner on behalf of 181drivers
Attachment #237059 -
Flags: approval1.8.1? → approval1.8.1+
Comment 11•18 years ago
|
||
verified fixed 1.9a1_2006090707 windows/mac*/linux
Status: RESOLVED → VERIFIED
Comment 12•18 years ago
|
||
verified fixed 1.8 1.9 20060909 windows/mac*/linux
Keywords: fixed1.8.1 → verified1.8.1
Updated•13 years ago
|
Crash Signature: [@ CheckDestructuring]
You need to log in
before you can comment on or make changes to this bug.
Description
•