United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6215242 : ShouldNotReachHere() failure at hotspot/src/cpu/i486/vm/c1_FrameMap_i486.cpp, 92

Details
Type:
Bug
Submit Date:
2005-01-07
Status:
Resolved
Updated Date:
2011-01-28
Project Name:
JDK
Resolved Date:
2005-02-11
Component:
hotspot
OS:
linux,generic,windows_xp,windows_2000
Sub-Component:
compiler
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2,1.4.2_06
Fixed Versions:
1.4.2_08 (b02)

Related Reports
Duplicate:
Relates:
Relates:
Relates:
Relates:

Sub Tasks

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
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
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



Hardware and Software, Engineered to Work Together