JDK-6215242 : ShouldNotReachHere() failure at hotspot/src/cpu/i486/vm/c1_FrameMap_i486.cpp, 92
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 1.4.2,1.4.2_06
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,linux,windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2005-01-07
  • Updated: 2011-01-28
  • Resolved: 2005-02-11
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
1.4.2_08 b02Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
// Ref: http://forum.java.sun.com/thread.jspa?threadID=584976
public class GoodbyeWorld {
 
  public static double func1(){
    double r = 0;
    for (int i = 0; i < 1; i++)
      r += func2();
    return r;
  }
 
  public static double func2(){
    double[] a = {0};
    double r = 0;
    for (int i = 0; i < 1; i++)
      r = a[i];
    return r;
  }
 
  public static void main(String[] argv) {
    for (int i = 0; i < 1000; i++)
      func1(); // System.out.println("i["+i+"]=" + func1());
  }
} 

The test case runs fine when using 1.4.2_05.

When run with 1.4.2_06 it crashes:

% java -client -showversion GoodbyeWorld
java version "1.4.2_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_06-b03)
Java HotSpot(TM) Client VM (build 1.4.2_06-b03, mixed mode)

#
# HotSpot Virtual Machine Error, Internal Error
# Please report this error at
# http://java.sun.com/cgi-bin/bugreport.cgi
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_06-b03 mixed mode)
#
# Error ID: 43113F2652414D452D41503F491418160E435050005C
#
# Problematic Thread: prio=5 tid=0x0810a028 nid=0x9 runnable 
#

Heap at VM Abort:
Heap
 def new generation   total 576K, used 136K [0xd2000000, 0xd20a0000, 0xd24e0000)
  eden space 512K,  26% used [0xd2000000, 0xd2022030, 0xd2080000)
  from space 64K,   0% used [0xd2080000, 0xd2080000, 0xd2090000)
  to   space 64K,   0% used [0xd2090000, 0xd2090000, 0xd20a0000)
 tenured generation   total 1408K, used 0K [0xd24e0000, 0xd2640000, 0xd6000000)
   the space 1408K,   0% used [0xd24e0000, 0xd24e0000, 0xd24e0200, 0xd2640000)
 compacting perm gen  total 4096K, used 965K [0xd6000000, 0xd6400000, 0xda000000)
   the space 4096K,  23% used [0xd6000000, 0xd60f1570, 0xd60f1600, 0xd6400000)
Abort (core dumped)

###@###.### 2005-1-07 19:48:03 GMT

Comments
EVALUATION This bug was caused by the fix for 4917709. The order of operations of creation of debug information for the compiled safepoint Goto and the move_to_phi operation was accidentally reversed. There was a doubleword floating-point value on the top of the expression stack which came in to tbe block as a phi and was loaded into a register. move_to_phi should cause the item for this value to be freed and a dummy value would be produced in the debug information to describe it; however, since the debug information was being produced before move_to_phi was called, the LIR item recorded in the debug information was a live register instead of a dummy value. Later, during LIR assembly, the FPU stack simulator would be queried during processing of the branch, but it was already cleared during the code emission done by move_to_phi. The fix is simply to put the move_to_phi and debug information generation operations back in the order they were originally written. This will be put back to the next available 1.4.2 update release; it's being temporarily committed to 1.4.2_07 without knowing whether it can make it in to that release. This bug doesn't affect 1.5 because the presence of safepoint polling moves the debug info onto the safepoint poll instruction which can legally refer to values on the FPU stack since values haven't been moved to phi locations yet. ###@###.### 2005-1-13 04:24:31 GMT
2005-01-13

WORK AROUND Use the -server flag to select the server compiler, or run with -Xint to stay in interpreted mode. ###@###.### 2005-1-07 19:48:03 GMT
2005-01-07