Closed Bug 632314 Opened 9 years ago Closed 9 years ago

Ephemeral stack frames do not get cleaned up

Categories

(Core :: JavaScript Engine, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: sfink, Assigned: sfink)

Details

(Whiteboard: [hardblocker][fixed-in-tracemonkey][has patch])

Attachments

(1 file)

When turning off debugging (now in jsdService::Deactivate called by jsdService::Off, until recently directly in jsdService::Off), almost all ephemeral objects are invalidated:

    jsdContext::InvalidateAll();
    jsdScript::InvalidateAll();
    jsdValue::InvalidateAll();
    jsdProperty::InvalidateAll();

notably missing is jsdStackFrame::InvalidateAll(). I see no reason for the omission, and I ran into a crash when using a stack frame from a dead JSDContext. I seem to crash a bit less if I invalidate those stack frames too, which admittedly isn't a very sound argument, but I think I'm running into crashes for multiple other reasons, so it's hard to tell what's what.

Vague STR: install the latest Firebug 1.7 and FBTest 1.7. Run it. Crash.
Invalidate jsdStackFrames when the rest of the ephemerals get invalidated.
Attachment #510520 - Flags: review?(timeless)
Comment on attachment 510520 [details] [diff] [review]
Invalidate jsdStackFrames when deactivating debugging

i'll buy that.

historically there are some shutdown things which intentionally leak, but this isn't that. i think that the off + on again path is probably relatively untested / historically unused.
Attachment #510520 - Flags: review?(timeless) → review+
blocking2.0: ? → betaN+
Whiteboard: hardblocker
Whiteboard: hardblocker → [hardblocker][has patch]
Assignee: nobody → sphink
http://hg.mozilla.org/tracemonkey/rev/7f471033a507
Whiteboard: [hardblocker][has patch] → [hardblocker][fixed-in-tracemonkey]
Whiteboard: [hardblocker][fixed-in-tracemonkey] → [hardblocker][fixed-in-tracemonkey][has patch]
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: JavaScript Debugging/Profiling APIs → JavaScript Engine
You need to log in before you can comment on or make changes to this bug.