Closed Bug 134739 Opened 24 years ago Closed 24 years ago

calling DumpJSStack from the wrong place causes a PR_ASSERT

Categories

(Core :: XPConnect, defect)

x86
FreeBSD
defect
Not set
normal

Tracking

()

VERIFIED WONTFIX

People

(Reporter: timeless, Assigned: dbradley)

Details

freebsd, cvsbuild, some intl patches, and probably a bunch of mail cleanup, but not enough and nothing important here ###!!! ASSERTION: The recipient list is not supposed to be null -Fix the caller!: 'recipients', file /home/timeless/mozilla/mailnews/compose/src/nsMsgCompFields.cpp, line 575 ###!!! Break: at file /home/timeless/mozilla/mailnews/compose/src/nsMsgCompFields.cpp, line 575 Suspending process; attach with the debugger. I attached, because i've been trying to catch this caller for ages. 0x281cc78c in js_DeflateString (cx=0x0, chars=0x88ef280, length=17) at /home/timeless/mozilla/js/src/jsstr.c:2706 2706 bytes[i] = (char) chars[i]; (gdb) up #1 0x281cca66 in js_GetStringBytes (str=0x882b7b0) at /home/timeless/mozilla/js/src/jsstr.c:2772 2772 bytes = js_DeflateString(NULL, JSSTRING_CHARS(str), (gdb) #2 0x28146207 in JS_GetStringBytes (str=0x882b7b0) at /home/timeless/mozilla/js/src/jsapi.c:3588 3588 bytes = js_GetStringBytes(str); (gdb) #3 0x281a3e77 in Decompile (ss=0xbfbf6cdc, pc=0x892c69b ";", nb=10) at /home/timeless/mozilla/js/src/jsopcode.c:1824 1824 todo = Sprint(&ss->sprinter, "%s%s", (gdb) #4 0x281a5543 in js_DecompileCode (jp=0x84e2480, script=0x892c600, pc=0x892c69b ";", len=10) at /home/timeless/mozilla/js/src/jsopcode.c:2278 2278 ok = Decompile(&ss, pc, len); (gdb) #5 0x281a6228 in js_DecompileValueGenerator (cx=0x8817600, spindex=1, v=0, fallback=0x0) at /home/timeless/mozilla/js/src/jsopcode.c:2593 2593 if (jp && js_DecompileCode(jp, script, begin, len)) (gdb) #6 0x2819c80b in js_ValueToNonNullObject (cx=0x8817600, v=0) at /home/timeless/mozilla/js/src/jsobj.c:3293 3293 str = js_DecompileValueGenerator(cx, JSDVG_SEARCH_STACK, v, NULL); (gdb) #7 0x28183843 in js_Interpret (cx=0x8817600, result=0xbfbf7754) at /home/timeless/mozilla/js/src/jsinterp.c:2576 2576 PROPERTY_OP(-1, CACHED_GET(OBJ_GET_PROPERTY(cx, obj, id, &rval))); (gdb) #8 0x28177104 in js_Invoke (cx=0x8817600, argc=1, flags=2) at /home/timeless/mozilla/js/src/jsinterp.c:805 805 ok = js_Interpret(cx, &v); (gdb) call DumpXPStack No symbol "DumpXPStack" in current context. (gdb) call DumpXPCom No symbol "DumpXPCom" in current context. (gdb) call DumpXPCom() No symbol "DumpXPCom" in current context. (gdb) call DumpJSStack $1 = {void ()} 0x288d283c <DumpJSStack> (gdb) call DumpJSStack() Assertion failure: 0 == rv, at /home/timeless/mozilla/nsprpub/pr/src/pthreads/ptsynch.c:191 Program received signal SIGABRT, Aborted. 0x286f87d0 in kill () from /usr/lib/libc_r.so.4 The program being debugged was signaled while in a function called from GDB. GDB remains in the frame where the signal was received. To change this behavior use "set unwindonsignal on" Evaluation of the expression containing the function (DumpJSStack) will be abandoned. (gdb) #2 0x283b665e in PR_Assert (s=0x283e4ad9 "0 == rv", file=0x283e4aa0 "/home/timeless/mozilla/nsprpub/pr/src/pthreads/ptsynch.c", ln=191) at /home/timeless/mozilla/nsprpub/pr/src/io/prlog.c:510 510 abort(); (gdb) #3 0x283d08ef in PR_Lock (lock=0x80cf980) at /home/timeless/mozilla/nsprpub/pr/src/pthreads/ptsynch.c:191 191 PR_ASSERT(0 == rv); (gdb) #4 0x281cc940 in js_GetStringBytes (str=0x893b720) at /home/timeless/mozilla/js/src/jsstr.c:2760 2760 JS_ACQUIRE_LOCK(deflated_string_cache_lock); (gdb) #5 0x28146207 in JS_GetStringBytes (str=0x893b720) at /home/timeless/mozilla/js/src/jsapi.c:3588 3588 bytes = js_GetStringBytes(str); (gdb) #6 0x281446d8 in JS_GetFunctionName (fun=0x8961320) at /home/timeless/mozilla/js/src/jsapi.c:2767 2767 return fun->atom (gdb) #7 0x288e4355 in FormatJSFrame (cx=0x8817600, fp=0x85fb0f0, buf=0x0, num=0, showArgs=1, showLocals=1, showThisProps=0) at /home/timeless/mozilla/js/src/xpconnect/src/xpcdebug.cpp:93 93 funname = JS_GetFunctionName(fun); Current language: auto; currently c++ (gdb) #8 0x288e4af4 in FormatJSStackDump (cx=0x8817600, buf=0x0, showArgs=1, showLocals=1, showThisProps=0) at /home/timeless/mozilla/js/src/xpconnect/src/xpcdebug.cpp:272 272 buf = FormatJSFrame(cx, fp, buf, num, showArgs, showLocals, showThisProps); (gdb) #9 0x288e4b65 in xpc_DumpJSStack (cx=0x8817600, showArgs=1, showLocals=1, showThisProps=0) at /home/timeless/mozilla/js/src/xpconnect/src/xpcdebug.cpp:287 287 buf = FormatJSStackDump(cx, nsnull, showArgs, showLocals, showThisProps); (gdb) #10 0x288d26c9 in nsXPConnect::DebugDumpJSStack (this=0x817fa40, showArgs=1, showLocals=1, showThisProps=0) at /home/timeless/mozilla/js/src/xpconnect/src/nsXPConnect.cpp:1182 1182 xpc_DumpJSStack(cx, showArgs, showLocals, showThisProps); (gdb) #11 0x288d28ee in DumpJSStack () at /home/timeless/mozilla/js/src/xpconnect/src/nsXPConnect.cpp:1216 1216 xpc->DebugDumpJSStack(PR_TRUE, PR_TRUE, PR_FALSE); (gdb) #12 <function called from gdb> I'm 99.9% certain this constitutes user error. (i'm not a very smart user)
Formally confirming bug for consideration; cc'ing jband -
Status: UNCONFIRMED → NEW
Ever confirmed: true
I suspect there may be a reinterancy problem. I'd attribute it to that calling functions like DumpJSStack from within the debugger may work but depending on where you break and the weather conditions at the time don't be surprised if it fails.
Marking WONTFIX, this is just the nature of the beast.
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → WONTFIX
Marking Verified -
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.