Closed Bug 857050 Opened 12 years ago Closed 12 years ago

[jsdbg2] Assertion failure: isEmpty(), at ./dist/include/mozilla/LinkedList.h:269 with timeout

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED
mozilla23

People

(Reporter: decoder, Assigned: Waldo)

Details

(Keywords: assertion, testcase, Whiteboard: [jsbugmon:update,bisect])

Attachments

(1 file)

The following testcase asserts on mozilla-central revision aae004a3c5d9 (no options required): function timeoutfunc() {} timeout(1, timeoutfunc); var g = newGlobal('new-compartment'); var dbg = Debugger(g);
Whiteboard: [jsbugmon:update,bisect]
Attached patch PatchSplinter Review
This assertion might look a little familiar... ;-) Arguably this should go after the DestroyContext call. But it happens that JS_DestroyRuntime doesn't GC right now, which means putting it there still hits the assert. Given we want to unify context/runtime eventually, probably JS_DestroyContext should do a final GC. But that's soooo much a change for another bug.
Assignee: general → jwalden+bmo
Status: NEW → ASSIGNED
Attachment #732466 - Flags: review?(jimb)
Comment on attachment 732466 [details] [diff] [review] Patch Review of attachment 732466 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/shell/js.cpp @@ +5350,4 @@ > printf("OOM max count: %u\n", OOM_counter); > #endif > > + JS_RemoveValueRootRT(rt, &gTimeoutFunc); Do we know for a fact that the operation callback can't possibly fire between here and the destruction of the runtime? I'd be a little more comfortable if we set gTimeoutFunc to null before removing its value root, so that it can't possibly matter.
Attachment #732466 - Flags: review?(jimb) → review+
Good point -- set it to null before removing the root. I think the callback only happens while script is running, and at that point none should be, in theory, but better safe than sorry. And this is much clearer anyway about giving up GC-safe ownership of the timeout function. https://hg.mozilla.org/integration/mozilla-inbound/rev/1a4e08f88780
Target Milestone: --- → mozilla23
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: