United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6684385 Loop unswitching crashes without LoopNode
JDK-6684385 : Loop unswitching crashes without LoopNode

Details
Type:
Bug
Submit Date:
2008-04-04
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
linux
Sub-Component:
compiler
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
hs13 (b01)

Related Reports
Backport:
Backport:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_05"
Java(TM) SE Runtime Environment (build 1.6.0_05-b13)
Java HotSpot(TM) Server VM (build 10.0-b19, mixed mode)


FULL OS VERSION :
Linux xx.yy.zz 2.6.9-22.20.ELsmp #1 SMP Fri Nov 18 03:04:44 EST 2005 x86_64 x86_64 x86_64 GNU/Linux


A DESCRIPTION OF THE PROBLEM :
If you download the open source product java2html and run it against the java classes in the openjdk/jdk/src/share/classes directory it crashes about one time in three.

THE PROBLEM WAS REPRODUCIBLE WITH -Xint FLAG: No

THE PROBLEM WAS REPRODUCIBLE WITH -server FLAG: Yes

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Download java2html.jar from http://www.java2html.com

Set CLASSPATH to point to j2h.jar and then try

java j2h -m 4 -n JFREE -js <Place where openjdk lives>/jdk/src/share/classes -d <some directory>


EXPECTED VERSUS ACTUAL BEHAVIOR :
It should run through all the *.java files and produce .html versions of them in the output directory.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Attached seperatly

REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
As per instructions above
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Disable loop unswitching: -XX:-LoopUnswitching

                                    

Comments
EVALUATION

Problem reproduces on x86 machines on solaris through hs12.

Server compiler is crashing in policy_unswitching() when _head is not a LoopNode. Problem could be trivially fixed by checking for is_loop(), however, since this is first sighting of the failure, there may other issues giving rise to the situation.
                                     
2008-04-04
EVALUATION

Due to the strange handling of irreducible loops, a non-irreducible loop was found on the second call to build_loop_tree(), and therfore was not beautified.

The fix is to simply change change policy_unswitching() to return false for any loop which does not have a LoopNode for a head.
                                     
2008-04-04



Hardware and Software, Engineered to Work Together