Closed
Bug 349489
Opened 19 years ago
Closed 19 years ago
Incorrect decompilation for labeled useless statements
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: brendan)
Details
(Keywords: testcase, verified1.8.1, Whiteboard: [181approval pending])
Attachments
(1 file)
|
1.65 KB,
patch
|
brendan
:
review+
mtschrep
:
approval1.8.1+
|
Details | Diff | Splinter Review |
When a function contains a labeled useless statement, decompilation puts the label on the next statement (or no statement, if there is no next statement).
> function() { L: 3; }
function () { L: }
> function() { L: }
SyntaxError on line 1: syntax error
> function() { L: 3; alert(5); }
function () { L: alert(5); }
Suggested fix:
(1) Don't optimize away labeled useless statements, or
(2) When optimizing away labeled useless statements, also remove the label.
| Assignee | ||
Comment 1•19 years ago
|
||
mrbkap said r=him a few minutes ago.
/be
| Assignee | ||
Comment 2•19 years ago
|
||
Drivers, this is another easy/safe fix. I encouraged Jesse to fuzz JS at the statement level, and informed him about labeled statements and break to label (which were news to him, probably to others). Here comes the fuzz! Better late than never.
/be
Flags: blocking1.8.1?
OS: Mac OS X 10.4 → All
Priority: -- → P1
Hardware: Macintosh → All
Target Milestone: --- → mozilla1.8.1
| Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 234830 [details] [diff] [review]
fix
See previous comment. Safe and small fix.
/be
Attachment #234830 -
Flags: approval1.8.1?
| Assignee | ||
Comment 4•19 years ago
|
||
Fixed on trunk.
/be
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Updated•19 years ago
|
Flags: blocking1.8.1? → blocking1.8.1+
Whiteboard: [181approval pending]
Comment 5•19 years ago
|
||
Checking in regress-349489.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-349489.js,v <-- regress-349489.js
initial revision: 1.1
Flags: in-testsuite+
Comment 6•19 years ago
|
||
Comment on attachment 234830 [details] [diff] [review]
fix
a=schrep for drivers - approving all [181approval pending] bugs now that tree is open.
Attachment #234830 -
Flags: approval1.8.1? → approval1.8.1+
Comment 8•19 years ago
|
||
verified fixed 1.8, 1.9 20060824 windows/mac*/linux
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1 → verified1.8.1
You need to log in
before you can comment on or make changes to this bug.
Description
•