Closed
Bug 217890
Opened 21 years ago
Closed 21 years ago
SpiderMonkey engine interprets JavaScript differently in a release vs debug build in 1.5RC5 and 1.5RC5a
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
DUPLICATE
of bug 217754
People
(Reporter: david.burke, Assigned: khanson)
Details
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: SpiderMonkey 1.5RC5a and 1.5RC5
None
Reproducible: Always
Steps to Reproduce:
Run the JSShell application that comes with SpiderMonkey distribution. On any
version including and before RC4a this happens: (in debug and release build)
js> function Test(x) { this.x = x; }
js> var obj = new Test(1);
js>
For releases RC5 and RC5a, this happens (but *only* on release build!!???)
js> function Test(x) { this.x = x; }
js> var obj = new Test(1);
1: ReferenceError: x is not defined
js>
Actual Results:
See Steps to Reproduce
Expected Results:
JavaScript interpretation should be identical in release and debug. More
specifically it should work as per 1.5RC4a and before... This problem is
blocking us from using a later version...
None
Reporter | ||
Comment 1•21 years ago
|
||
Only affects global scope it seems...
hrm, my cvs Makefile.ref builds w/ updated config dirs both debug and opt result
in no errors. i could try the release builds if necessary...
Comment 3•21 years ago
|
||
This bug is not affecting me on WinNT4.0, but I build the JS shell
via the Makefile.ref system, not MS Visual C++ and the js.mak file.
Here are sessions in both the debug and optimized JS shell. I tried
both the current trunk and the JS1.5 RC5a release:
----------------------- DEBUG JS SHELL -------------------------
[//d/JS_TRUNK/mozilla/js/src/WINNT4.0_DBG.OBJ] ./js
js> function Test(x) { this.x = x; }
js> var obj = new Test(1);
js> obj.toSource();
({x:1})
--------------------- OPTIMIZED JS SHELL -----------------------
[//d/JS_TRUNK/mozilla/js/src/WINNT4.0_OPT.OBJ] ./js
js> function Test(x) { this.x = x; }
js> var obj = new Test(1);
js> obj.toSource();
({x:1})
js>
Dave: how are you building the JS shell? If it's via VC++, which version?
Compare bug 217754,
"Optimized stand-alone version doesn't work when built with VC6"
Assignee: rogerl → khanson
Status: UNCONFIRMED → NEW
Ever confirmed: true
i just built js.mak jsshell release and debug (same tree as earlier), they work
fine too.
Reporter | ||
Comment 5•21 years ago
|
||
I am building with MSVC6 SP3 using the js.mdp file. This bug appears to be
identical to bug 217754, "Optimized stand-alone version doesn't work when built
with VC6" (apologies I couldn't find this when submitting).
Removal of /02 in Release build fixes the problem (but obviously not a good
workaround). Haven't had time to figure out the Makefile.ref system for Win32
yet...
in the interim try:
nmake /f js.mak
or
nmake /f js.mak CFG="...some config string from the list in js.mak"
i might look at js.mdp but it's not a priority for me (don't worry i'm not core).
Reporter | ||
Comment 7•21 years ago
|
||
Thank you - nmake does the trick!
Comment 8•21 years ago
|
||
Dave and timeless: thanks. Based on the above comments, I'm going to
resolve this as a duplicate of bug 217754,
"Optimized stand-alone version doesn't work when built with js.mdp"
*** This bug has been marked as a duplicate of 217754 ***
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•