Closed Bug 59861 Opened 24 years ago Closed 21 years ago

Test ecma/Date/15.9.4.3 infinite loop under JDK 1.3, -opt 9

Categories

(Rhino Graveyard :: Core, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: norrisboyd, Assigned: beard)

Details

Title says it all. Perhaps there's a bug in HotSpot? My analysis showed a possible loop in YearFromTime.
Reassigning to Patrick, as this fits in with the other Date bugs he inherited from mccabe -
Assignee: rogerl → beard
Reconfirming bug with JDK 1.3 on WinNT. If I leave out the opt -9, the testcase passes: java org.mozilla.javascript.tools.shell.Main -f ecma/shell.js -f ecma/Date/15.9.4.3.js Date.UTC( 1970,0,1,0,0,0,0) = 0 PASSED! Date.UTC( 1970,0,1,0,0,0,0) = 0 PASSED! etc. etc. But if I include -opt 9, an infinite loop occurs: java org.mozilla.javascript.tools.shell.Main -opt 9 -f ecma/shell.js -f ecma/Date/15.9.4.3.js
Is this just a dupe of bug 64312? "Repeatedly initializing JS (Rhino) causes breakpoint on W2K " Note: has been acknowledged by Sun as a bug and is under ID 4402079.
I don't think we know yet whether or not this is a dup of 64312. Certainly the behavior is different.
Accepting this bug for tracking purposes.
Status: NEW → ASSIGNED
Phil, could you retest this old bug with the current Rhino against the configuration that originally triggers the bug? I committed the following patch to YearFromTime not to call TimeFromYear(mid) twice. Perhaps it is what confused JDK 1.3 JIT initially? if (TimeFromYear(mid) > t) { hi = mid - 1; } else { - if (TimeFromYear(mid) <= t) { - int temp = mid + 1; - if (TimeFromYear(temp) > t) { - return mid; - } - lo = mid + 1; + lo = mid + 1; + if (TimeFromYear(lo) > t) { + return mid; } }
Doesn't seem to help. I still hang under JDK 1.3 on WinNT: [ ]java org.mozilla.javascript.tools.shell.Main -opt9 -f ecma/shell.js -f ecma/Date/15.9.4.3.js (..... HANGS ....) [] java -fullversion java full version "1.3.0_02" There is no hang, though, even with -opt9, under JDK 1.4 on WinNT: [ ] java -fullversion java full version "1.4.1-b21"
I am curious, is it possible to reproduce this with a smaller test or perhaps a simple file?
Closing as WONTFIX as the test case runs fine under JDK 1.3.1_10 on Windows so even with 1.3.* JDK one can get JVM that works.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.