Closed
Bug 476050
Opened 17 years ago
Closed 14 years ago
TM: js_GC tests for JS_ON_TRACE appear insufficient
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
WONTFIX
People
(Reporter: jorendorff, Unassigned)
Details
I haven't tried to get this to crash, but I see 2 possible bugs in this code:
void
js_GC(JSContext *cx, JSGCInvocationKind gckind)
{
...
if (JS_ON_TRACE(cx))
goto out;
...
restart:
...
... (actually do GC here)
...
out:
...
if (rt->gcLevel > 1 || rt->gcPoke) {
rt->gcLevel = 1;
rt->gcPoke = JS_FALSE;
JS_UNLOCK_GC(rt);
goto restart;
}
...
}
1. There's a path that puts us at `restart` even though we're on trace.[*]
2. If we're on trace in some context other context than cx, and that context is on the current thread, we could GC. (I don't know how applications use multiple contexts on a thread in practice, so I really don't know how significant this is.)
[*] You can thank treehydra for that observation.
| Reporter | ||
Comment 1•17 years ago
|
||
Part 1 is fixed in rev 932126be5356 (bug 476177).
Comment 2•14 years ago
|
||
Obsolete with the removal of tracejit.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•