Closed
Bug 600310
Opened 14 years ago
Closed 14 years ago
TM: don't perform GC outside of stack quota
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
blocking2.0 | --- | beta8+ |
People
(Reporter: gwagner, Assigned: gwagner)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 3 obsolete files)
896 bytes,
patch
|
igor
:
review+
|
Details | Diff | Splinter Review |
from Bug 600139
Updated•14 years ago
|
blocking2.0: --- → ?
Assignee | ||
Updated•14 years ago
|
Assignee: general → anygregor
Assignee | ||
Comment 1•14 years ago
|
||
Assignee | ||
Comment 2•14 years ago
|
||
Assert in js_GC
Attachment #480313 -
Attachment is obsolete: true
Attachment #480326 -
Flags: review?(igor)
Assignee | ||
Comment 3•14 years ago
|
||
Comment on attachment 480326 [details] [diff] [review] patch No it's not that easy...
Attachment #480326 -
Flags: review?(igor)
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #480326 -
Attachment is obsolete: true
Comment 5•14 years ago
|
||
Comment on attachment 480359 [details] [diff] [review] patch >diff -r eb83de9d08da js/src/jsgc.cpp >--- a/js/src/jsgc.cpp Fri Oct 01 17:53:08 2010 -0700 >+++ b/js/src/jsgc.cpp Fri Oct 01 20:59:55 2010 -0700 >@@ -2671,16 +2671,21 @@ js_GC(JSContext *cx, JSGCInvocationKind > * should suppress that final collection or there may be shutdown leaks, > * or runtime bloat until the next context is created. > */ > if (rt->state != JSRTS_UP && gckind != GC_LAST_CONTEXT) > return; > > RecordNativeStackTopForGC(cx); > >+#ifdef DEBUG >+ ConservativeGCThreadData *ctd = &JS_THREAD_DATA(cx)->conservativeGC; >+ JS_ASSERT(JS_CHECK_STACK_SIZE(cx->stackLimit, ctd->nativeStackTop)); >+#endif nativeStackTop can be the stack at the moment of SuspendRequest with js_GC called outside a request with much deeper stack. So the check above is not suitable for proper stack space detection. A solution could be to add to jscntxt.h an inline like (any better name is welcomed here): inline void AssertNativeStackSpace(JSContext *cx) { #ifdef DEBUG int stackDummy; JS_ASSERT(JS_CHECK_STACK_SIZE(cx->stackLimit, &stackDummy)); #endif }
Attachment #480359 -
Flags: review-
Updated•14 years ago
|
blocking2.0: ? → beta8+
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #480359 -
Attachment is obsolete: true
Assignee | ||
Comment 7•14 years ago
|
||
this passes now tryserver and I hit this assertion for the testcase in bug 600139.
Updated•14 years ago
|
Attachment #480829 -
Flags: review+
Assignee | ||
Comment 8•14 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/fd4510c77054
Whiteboard: fixed-in-tracemonkey
Comment 9•14 years ago
|
||
http://hg.mozilla.org/mozilla-central/rev/fd4510c77054
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•