Closed
Bug 361346
Opened 18 years ago
Closed 18 years ago
Crash with setter, watch, and GC
Categories
(Core :: JavaScript Engine, defect, P1)
Core
JavaScript Engine
Tracking
()
VERIFIED
FIXED
mozilla1.8.1
People
(Reporter: jruderman, Assigned: mrbkap)
References
Details
(4 keywords, Whiteboard: [sg:critical?])
Attachments
(2 files, 1 obsolete file)
2.64 KB,
patch
|
brendan
:
review+
jay
:
approval1.8.0.9+
jay
:
approval1.8.1.1+
|
Details | Diff | Splinter Review |
2.12 KB,
text/plain
|
Details |
js> this.x setter= new Function; this.watch('x', function(){}); gc(); x = {};
before 9232, after 9232, break 01205000
Bus error
I saw this jump to a bogus address a few times, so I'm marking the bug security-sensitive.
Reporter | ||
Updated•18 years ago
|
Whiteboard: [sg:critical?]
Assignee | ||
Comment 1•18 years ago
|
||
I think the problem here is that we replace the sprop that contains the setter as its setter on the object, and then fail to mark it ever again (since it's stored in the watchpoint's setter field, and to this point, nobody marks it). This patch fixes the bug for me.
Comment 2•18 years ago
|
||
Comment on attachment 246122 [details] [diff] [review]
Potential fix
>+ JS_MarkGCThing(cx, wp->setter, "wp->setter", NULL);
Only if (wp->sprop->attrs & JSPROP_SETTER), right? Otherwise, it's a JSPropertyOp and we shouldn't try to mark it.
/be
Assignee | ||
Comment 3•18 years ago
|
||
Attachment #246122 -
Attachment is obsolete: true
Attachment #246125 -
Flags: review?(brendan)
Attachment #246122 -
Flags: review?(brendan)
Updated•18 years ago
|
OS: Mac OS X 10.4 → All
Hardware: Macintosh → All
Comment 4•18 years ago
|
||
Comment on attachment 246125 [details] [diff] [review]
With that fixed
Looks good, please nominate the bug too.
/be
Attachment #246125 -
Flags: review?(brendan)
Attachment #246125 -
Flags: review+
Attachment #246125 -
Flags: approval1.8.1.1?
Attachment #246125 -
Flags: approval1.8.0.9?
Reporter | ||
Updated•18 years ago
|
Flags: blocking1.8.1.1?
Flags: blocking1.8.0.9?
Updated•18 years ago
|
Flags: blocking1.8.1.1?
Flags: blocking1.8.1.1+
Flags: blocking1.8.0.9?
Flags: blocking1.8.0.9+
Comment 5•18 years ago
|
||
Comment on attachment 246125 [details] [diff] [review]
With that fixed
Approved for both branches. a=jay for drivers, please land asap.
Attachment #246125 -
Flags: approval1.8.1.1?
Attachment #246125 -
Flags: approval1.8.1.1+
Attachment #246125 -
Flags: approval1.8.0.9?
Attachment #246125 -
Flags: approval1.8.0.9+
Comment 6•18 years ago
|
||
This has yet to be landed anywhere -- mrbkap, can you do the checkins?
/be
Assignee | ||
Comment 7•18 years ago
|
||
Fixed on trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Priority: -- → P1
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.8.1
Comment 10•18 years ago
|
||
crashes on shutdown before fixes.
Updated•18 years ago
|
Flags: in-testsuite+
Comment 11•18 years ago
|
||
verified fixed 20061125 1.8.0.9 windows/linux/mac*, 1.8.1.1 windows/linux/mac*, 1.9 windows/linux
Status: RESOLVED → VERIFIED
Updated•18 years ago
|
Group: security
Comment 12•18 years ago
|
||
/cvsroot/mozilla/js/tests/js1_5/extensions/regress-361346.js,v <-- regress-361346.js
You need to log in
before you can comment on or make changes to this bug.
Description
•