Closed
Bug 381374
Opened 18 years ago
Closed 18 years ago
"Assertion failure: *flagp != GCF_FINAL" with getter, setter, watch, and more
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: jruderman, Assigned: mrbkap)
Details
(4 keywords, Whiteboard: [sg:critical?])
Attachments
(4 files)
312 bytes,
text/javascript
|
Details | |
1.88 KB,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
1.81 KB,
patch
|
dveditz
:
approval1.8.1.5+
dveditz
:
approval1.8.0.13+
|
Details | Diff | Splinter Review |
2.71 KB,
text/plain
|
Details |
$ ./js ~/gc-crash.js
Assertion failure: *flagp != GCF_FINAL, at jsgc.c:2147
Reporter | ||
Comment 1•18 years ago
|
||
This can also trigger:
Assertion failure: offsetInArena < GC_THINGS_SIZE, at jsgc.c:513
Assignee | ||
Comment 2•18 years ago
|
||
This is a GC hazard in js_AddScopeProperty in the |overwriting| case when the property we're overwriting has a watchpoint set on it. The problem is that we remove the old property from the property tree, preparing to replace it with a new property, and then we call js_WrapWatchedSetter, which can cause a GC. Because we've removed the property from its property tree, it doesn't get marked, which means that none of its members get marked, which leaves its getter up for grabs.
Assignee | ||
Comment 3•18 years ago
|
||
I'm not sure if there's a cleaner way to fix this bug, but this does the trick by ensuring that the overwritten property is marked when we create the new setter for the watchpoint.
Comment 4•18 years ago
|
||
Comment on attachment 265579 [details] [diff] [review]
Potential fix
This is exactly the purpose of JS_PUSH_TEMP_ROOT_SPROP. But I would even suggest to remove "if (overwriting)" checks around tvr calls for safer and smaller code.
Attachment #265579 -
Flags: review?(igor) → review+
Assignee | ||
Comment 5•18 years ago
|
||
Assignee | ||
Comment 6•18 years ago
|
||
Fix checked into trunk.
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
Comment 7•18 years ago
|
||
Updated•18 years ago
|
Flags: in-testsuite+
Reporter | ||
Updated•18 years ago
|
Whiteboard: [sg:critical?]
Comment 8•18 years ago
|
||
The testcase in the bug calls "gczeal()" which is new on the trunk so I can't test the branch easily, but the patched code looks identical in 1.8.1.x so we probably need this fix there.
May want to take gczeal on the branch (bug 308429)
Flags: wanted1.8.1.x?
Flags: wanted1.8.0.x?
Flags: blocking1.8.1.5?
Flags: blocking1.8.0.13?
Reporter | ||
Comment 9•18 years ago
|
||
You might be able to reproduce on branch using TOO_MUCH_GC or WAY_TOO_MUCH_GC.
Comment 10•18 years ago
|
||
yeah, that would be the "not easily" way.
Updated•18 years ago
|
Flags: wanted1.8.1.x?
Flags: wanted1.8.1.x+
Flags: wanted1.8.0.x?
Flags: wanted1.8.0.x+
Flags: blocking1.8.1.5?
Flags: blocking1.8.1.5+
Flags: blocking1.8.0.13?
Flags: blocking1.8.0.13+
Assignee | ||
Comment 11•18 years ago
|
||
Comment on attachment 265586 [details] [diff] [review]
What I'm about to check in
This applies the 1.8 and 1.8.0 branches as-is.
Attachment #265586 -
Flags: approval1.8.1.5?
Attachment #265586 -
Flags: approval1.8.0.13?
Comment 12•18 years ago
|
||
Comment on attachment 265586 [details] [diff] [review]
What I'm about to check in
approved for 1.8.1.5 and 1.8.0.13, a=dveditz
Attachment #265586 -
Flags: approval1.8.1.5?
Attachment #265586 -
Flags: approval1.8.1.5+
Attachment #265586 -
Flags: approval1.8.0.13?
Attachment #265586 -
Flags: approval1.8.0.13+
Comment 14•18 years ago
|
||
verified fixed 1.8.1, 1.9.0 windows/linux/macppc opt/debug shell/browser 7/16
Status: RESOLVED → VERIFIED
Keywords: fixed1.8.1.5 → verified1.8.1.5
Can someone with a debug build verify this is fixed with a Firefox 1.5.0.13 candidate? Thanks!
Comment 16•18 years ago
|
||
(In reply to comment #15)
> Can someone with a debug build verify this is fixed with a Firefox 1.5.0.13
> candidate? Thanks!
The test case isn't supported on the 1.8.0 branch. I don't know how it could be verified there.
(In reply to comment #16)
> (In reply to comment #15)
> > Can someone with a debug build verify this is fixed with a Firefox 1.5.0.13
> > candidate? Thanks!
>
> The test case isn't supported on the 1.8.0 branch. I don't know how it could be
> verified there.
Sorry, I really meant a debug build of Thunderbird 1.5.0.13 (using either Thunderbrowse or the Mail Start Page trick), since it has fixed1.5.0.13 as a keyword.
Updated•18 years ago
|
Group: security
Comment 18•17 years ago
|
||
/cvsroot/mozilla/js/tests/js1_7/GC/regress-381374.js,v <-- regress-381374.js
initial revision: 1.1
You need to log in
before you can comment on or make changes to this bug.
Description
•