It looks like the fix for bug 102725, "gcc -O2 problems converting numbers to strings", has caused a regression in the debug JS shell on Linux. I should have reported this sooner, but I missed this in my own testing data. It only happens to me on Linux, and only in the debug JS shell, not the optimized shell. I am using gcc version 2.95.3 20010315 (release). Here is how to reproduce the bug: var n = 17976931348623158079372897140530341507993413271003782693617377898044496829276475 09466490179775872070963302864166928879109465555478519404026306574886715058206819 08902000708383676273854845817711531764475730270069855571366959622842914819860834 936475292719074168444365510704342711559699508093042880177904174497792; print(n); On WinNT, Mac9.1, and Linux optimized, this outputs "Infinity". On Linux debug, it outputs "NaN" instead, which is causing the following testcase to fail in the debug shell: mozilla/tests/ecma/TypeConversion/9.3.1-1.js Note the checkins made for bug 102725 consisted of: jsnum.h version 3.12 jsdtoa.c version 3.14 If I revert these to versions 3.11, 3.13, respectively, the bug goes away. Hence allow me to assign this one to Brian, and cc people from bug 102725.
Typo above: the testsuite failure is mozilla/js/tests/ecma/TypeConversion/9.3.1-1.js The reduced testcase I've provided, however, captures the problem -
I can't reproduce this on gcc 2.96-85... perhaps it's specific to 2.95.3? I'll do a build with that when I get a chance.
Status: NEW → ASSIGNED
Confirmed that this occurs in a debug build with gcc 2.95.3.
Created attachment 63933 [details] [diff] [review] hack-around patch This patch makes it so the new code is only used for gcc 2.96 and higher.
Comment on attachment 63933 [details] [diff] [review] hack-around patch email@example.com
Attachment #63933 - Flags: superreview+
Status: ASSIGNED → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED
Verified FIXED with JS optimized and debug shells built today at 12:00. All tests in mozilla/js/tests/ecma/TypeConversion are now passing, and the standalone JS shell testcase above now outputs "Infinity" in both shells on WinNT, Linux, and Mac9.1.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.