Closed Bug 327605 Opened 19 years ago Closed 19 years ago

[@ JSD_GetContextFlags - jsdService::GetFlags]

Categories

(Other Applications Graveyard :: Venkman JS Debugger, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: timeless, Assigned: timeless)

Details

(Keywords: crash)

Crash Data

Attachments

(1 obsolete file)

i have a js component in components/ The top of the file has: (function (){ var jsd=Components.classes["@mozilla.org/js/jsd/debugger-service;1"].getServic jsd.flags &= ~jsd.DISABLE_OBJECT_TRACE; jsd.flags |= jsd.COLLECT_PROFILE_DATA | jsd.ENABLE_NATIVE_FRAMES; })() It's not very interesting. It's just missing some important little details. Like enough basics to let jsd initialize. The result is a pretty crash 00 jsd3250!JSD_GetContextFlags(struct JSDContext * jsdc = 0x00a94af8)+0x4 [r:\mozilla\js\jsd\jsdebug.c @ 133] 01 jsd3250!jsdService::GetFlags(unsigned int * _rval = 0x00a1e048)+0xc [r:\mozilla\js\jsd\jsd_xpc.cpp @ 2454] 02 xpcom_core!XPTC_InvokeByIndex(class nsISupports * that = 0x00a1e048, unsigned int methodIndex = 0x16, unsigned int paramCount = 1, struct nsXPTCVariant * params = 0x0012f27c)+0x27 [r:\mozilla\xpcom\reflect\xptcall\src\md\win32\xptcinvoke.cpp @ 102] 03 xpc3250!XPCWrappedNative::CallMethod(class XPCCallContext * ccx = 0x0012f420, XPCWrappedNative::CallMode mode = CALL_GETTER (1))+0x6c4 [r:\mozilla\js\src\xpconnect\src\xpcwrappednative.cpp @ 2139] 04 xpc3250!XPC_WN_GetterSetter(struct JSContext * cx = 0x00992ab0, struct JSObject * obj = 0x00994020, unsigned int argc = 0, long * argv = 0x00a1336c, long * vp = 0x0012f4e0)+0xce [r:\mozilla\js\src\xpconnect\src\xpcwrappednativejsops.cpp @ 1476] Unfortunately the optimizer is pretty clever which makes the arguments for the top frames very bad. jsd3250!gJsds->mCx 0x00000000 struct JSDContext * Is what was passed from frame 01 to frame 00. in frame 00, jsd3250!JSD_GetContextFlags+0x4: 00e0103c 8b4010 mov eax,[eax+0x10] ds:0023:00000010=???????? JSD_PUBLIC_API(uint32) JSD_GetContextFlags(JSDContext *jsdc) { JSD_ASSERT_VALID_CONTEXT(jsdc); return jsdc->flags; } We crash dereferencing jsdc (aka mCx aka 0x0).
Attached patch assert_valid_context (obsolete) — Splinter Review
Attachment #212212 - Flags: review?
Attachment #212212 - Flags: review? → review?(rginda)
Comment on attachment 212212 [details] [diff] [review] assert_valid_context r=rginda
Attachment #212212 - Flags: review?(rginda) → review+
Comment on attachment 212212 [details] [diff] [review] assert_valid_context mozilla/js/jsd/jsd_xpc.cpp 1.73
Attachment #212212 - Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Crash Signature: [@ JSD_GetContextFlags - jsdService::GetFlags]
Product: Other Applications → Other Applications Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: