Subj : Re: Exception in SpiderMonkey v1.6 pr 6a To : netscape.public.mozilla.jseng From : Rob Swindell Date : Mon May 02 2005 07:21 pm "Brendan Eich" wrote in message news:42765FEE.1040003@meer.net... > Rob Swindell wrote: > > Here's a call-stack from a recent crash of a script using js32.dll > > (JavaScript-C 1.5 pre-release 6a 2004-06-09): > > > > js_LookupPropertyWithFlags(JSContext * 0x00a32010, JSObject * 0x015a2cf8, > > long 0x01cbc3f0, unsigned int 0x00000000, JSObject * * 0x0012e39c, > > JSProperty * * 0x0012e318) line 2442 + 34 bytes > > js_LookupProperty(JSContext * 0x00a32010, JSObject * 0x015a2cf8, long > > 0x01cbc3f0, JSObject * * 0x0012e39c, JSProperty * * 0x0012e318) line 2417 + > > 27 bytes > > js_Interpret(JSContext * 0x00a32010, unsigned char * 0x015f2913, long * > > 0x0012e4ec) line 2426 + 43 bytes > > In RC6a, this line is the starred one below: > > str = js_ConcatStrings(cx, str, str2); > * if (!str) { > ok = JS_FALSE; > goto out; > } > > > Have you hacked on jsinterp.c by any chance? Nope. I have jsinterp.c rev 3.162, where line 2462 is starred below: /* Skip properties not owned by obj when looking from origobj. */ * ok = OBJ_LOOKUP_PROPERTY(cx, origobj, fid, &obj2, &prop); if (!ok) goto out; BTW, it'd be nice if the source files had CVS tags (e.g. "$Id: $") indicating the revision. > > js_Invoke(JSContext * 0x00a32010, unsigned int 0x00000001, unsigned int > > 0x00000000) line 1313 + 22 bytes > > js_Interpret(JSContext * 0x00a32010, unsigned char * 0x015aa75f, long * > > 0x0012f5b0) line 3566 + 15 bytes > > js_Execute(JSContext * 0x00a32010, JSObject * 0x010e93a8, JSScript * > > 0x016772c0, JSStackFrame * 0x00000000, unsigned int 0x00000000, long * > > 0x0012f6cc) line 1523 + 19 bytes > > JS_ExecuteScript(JSContext * 0x00a32010, JSObject * 0x010e93a8, JSScript * > > 0x016772c0, long * 0x0012f6cc) line 3630 + 25 bytes > > js_exec(const char * 0x00a50c21, char * * 0x00a50bd4) line 721 + 36 bytes > > main(int 0x0000000a, char * * 0x00a50bb0, char * * 0x00a50c58) line 976 + 25 > > bytes > > mainCRTStartup() line 206 + 25 bytes > > KERNEL32! 7c59893d() > > > > Line 2442 in jsobj.c is simple a call to this (rather extensive) macro: > > > > CHECK_FOR_FUNNY_INDEX(id); > > > > Any clues as the cause/solution would be appreciate, > > > It's really impossible to say without accurate source line numbers > referring to source I can check out, along with debugger information > such as id's value in hex, memory it references, etc. Here are the local variable contents at the time of the exception: + cs 0x00000000 + cx 0x00a32010 flags 0x00000000 format 0x00000000 id 0x01cbc3f0 newresolve 0x0012d414 + obj 0x015a2cf8 + *objp 0x010e93a8 ok 0x7ffdf000 + pc 0x00000001 "" + *propp 0x01d7bcec I realize now that my js32.dll built from a CVS snapshot where JS_GetImplementationVersion() returns "JavaScript-C 1.5 pre-release 6a 2004-06-09", is not *actually* SpiderMonkey 1.5 PR 6a. I was under the (apparently incorrect) assumption that cvs-mirror.mozilla.org only contained released source and that the string returned from JS_GetImplementationVersion() would actually reflect the version built from the MAIN/HEAD rev. :-( Can I suggest tagging the released SpiderMonkey files with a common label (say "JS_LATEST_RELEASE") which will allow someone to get the latest *released* version of the SpiderMonkey code? When a new release is made, they are relabeed as JS_LATEST_RELEASE (which moves the label). Currently, you would have to search for the lateset release label (e.g. "JS_150_RC6a") and get based on that label or rely on the versioned-tarball from the FTP server. :-( Now I have to decide if I should revert to the actual 1.5 pr 6a code or use the latest from CVS. Any suggestions? > Find me on irc.mozilla.org #developers some time. I'll try to do that. -Rob .