Closed Bug 349482 Opened 18 years ago Closed 18 years ago

Decompiling "try/catch" in "for..in" or "with" crashes [@ js_SetRequiredSlot ] [@ js_puts]

Categories

(Core :: JavaScript Engine, defect, P1)

defect

Tracking

()

VERIFIED FIXED
mozilla1.8.1

People

(Reporter: jruderman, Assigned: mrbkap)

References

Details

(Keywords: crash, testcase, verified1.8.1, Whiteboard: [Fx2b2 rider][181approval pending])

Crash Data

Attachments

(1 file)

Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20060820 Minefield/3.0a1

This crashes [@ js_SetRequiredSlot]:
    javascript:function() { for(p in {})   try{}catch(e){}   }

This crashes [@ js_puts]:
    javascript:function() { with({})     { try{}catch(e){} } } 

Sorry if this should have been two separate bugs.
Attached patch Minimal patchSplinter Review
Destructuring catch will hit this code pretty hard, I imagine (currently the decompiler asserts if you try it), but this patch accounts for the block depth that we added in bug 336379 comment 61.
Assignee: general → mrbkap
Status: NEW → ASSIGNED
Attachment #234756 - Flags: review?(brendan)
Comment on attachment 234756 [details] [diff] [review]
Minimal patch

Oops.  No brainer, safe for beta 2 if there is time.

/be
Attachment #234756 - Flags: review?(brendan)
Attachment #234756 - Flags: review+
Attachment #234756 - Flags: approval1.8.1?
Thanks for taking this, mrbkap.

/be
Flags: blocking1.8.1?
Flags: blocking1.8.1? → blocking1.8.1+
Target Milestone: --- → mozilla1.8.1
Whiteboard: [181approval pending]
Whiteboard: [181approval pending] → [Fx2b2 rider][181approval pending]
Fixed checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
OS: Mac OS X 10.4 → All
Priority: -- → P1
Hardware: Macintosh → All
Resolution: --- → FIXED
Checking in regress-349482-01.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-349482-01.js,v  <--  regress-349482-01.js
initial revision: 1.1
done
RCS file: /cvsroot/mozilla/js/tests/js1_5/Regress/regress-349482-02.js,v
done
Checking in regress-349482-02.js;
/cvsroot/mozilla/js/tests/js1_5/Regress/regress-349482-02.js,v  <--  regress-349482-02.js
initial revision: 1.1
Flags: in-testsuite+
Comment on attachment 234756 [details] [diff] [review]
Minimal patch

a=schrep for drivers - approving all [181approval pending] bugs now that tree is open.
Attachment #234756 - Flags: approval1.8.1? → approval1.8.1+
This patch depends on patches landed for bug 336379, so it will have to wait till that bug is fixed on the branch.  Actually, I'd rather do a mega-patch, once the small fry with approval have landed.

/be
Depends on: 336379
verified fixed 1.9 20060824 windows/mac*/linux
Status: RESOLVED → VERIFIED
Fix landed yesterday on the 1.8 branch as part of the destructuring/lexical catch var patch.

/be
Keywords: fixed1.8.1
verified fixed 1.8, 1.9 20060909 windows/mac*/linux
Crash Signature: [@ js_SetRequiredSlot ] [@ js_puts]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: