Subj : Re: Stack corruption ? ( SpiderMonkey rc5 Win32 release) To : Pritham Shetty From : Brendan Eich Date : Wed May 14 2003 02:04 pm Pritham Shetty wrote: >Hi, > >I recently migrated to rc5 build from rc4a and everything seemed to work >fine till I compiled the rc5 engine in release mode and some of my scripts >fail to execute. I was able to finally reproduce the problem with a simple >script and running it under jsshell. > See bug 151066 (http://bugzilla.mozilla.org/show_bug.cgi?id=151066). The necessary MSVC linker option has been in js/src/Makefile.in since last summer. /be > >Test case : >--------------------------------------------------- >function trace(a) >{ > print(a); >} > >trace("***** Hello *******"); > >----------------------------------------------------- > >I get the following error : "ReferenceError: a is not defined" if js32.dll >is release build, works fine in debug build. > > >arguments.length and arguments[0] seems to be valid if I print it within the >function. > >I was thinking this could be a compiler bug when I got it working by turning >off optimization for one function in jsapi.c. This seems to fix the problem >above but the script error shifts to other location within my script. I am >wondering this may not be a compiler error but memory corruption issue. > >#pragma optimize( "", off ) >JS_PUBLIC_API(JSBool) >JS_PropertyStub(JSContext *cx, JSObject *obj, jsval id, jsval *vp) >{ > return JS_TRUE; >} >#pragma optimize( "", on ) > >I am using Visual C++ 6.0. > >Anyone else experiencing similar problems ? > >Thanks, > >Pritham. > > > > > > > .