United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6716441 error in meet with +DoEscapeAnalysis
JDK-6716441 : error in meet with +DoEscapeAnalysis

Details
Type:
Bug
Submit Date:
2008-06-18
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs13
Fixed Versions:
hs14 (b01)

Related Reports
Backport:
Backport:
Relates:
Relates:

Sub Tasks

Description
The report for 6589823 includes a test case which fails with meet not symmetric but it's failing for different reasons.  From the comments of that report:

Please see Tester.java class generated by JITTester which fails the same
way starting from HS12-b03 (jdk7b26). The error is:

=== Meet Not Symmetric ===
t   =                   narrowoop: Tester_Class_2:TopPTR:exact *[int:48]:AnyNull:exact *,iid=-58
this=                   Tester_Class_0:AnyNull *
mt=(t meet this)=       java/lang/Object:NotNull:exact *,iid=-58
t_dual=                 narrowoop: Tester_Class_2:exact *[int:48]:NotNull:exact *,iid=58
this_dual=              Tester_Class_0:NotNull *
mt_dual=                java/lang/Object:AnyNull:exact *,iid=58
mt_dual meet t_dual=    narrowoop: Tester_Class_2:exact *[int:48]:NotNull:exact *
mt_dual meet this_dual= java/lang/Object:NotNull *
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/type.cpp:541
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/BUILD_AREA/jdk7/hotspot/src/share/vm/opto/type.cpp:541), pid=12905, tid=1083214144
#  Error: meet not symmetric
#


The problem is not reproduced with HS12-b01 (jdk7b25).
The problem is -XX:+AggressiveOpts specific.

To reproduce the problem do something like:
1. ssh linux-amd64 machine
2. javac Tester.java
3. /net/sqenfs-1.sfbay/export1/jdk/re/7/promoted/all/b27/binaries/linux-amd64/fastdebug/bin/java  -Xcomp -d64 -server  -XX:+AggressiveOpts Tester

Running with +DoEscapeAnalysis alone it fails like this with current c2_baseline:

java -d64 -XX:+DoEscapeAnalysis -Xcomp Tester                             VM option '+DoEscapeAnalysis'
=== Meet Not Symmetric ===
t   =                   Tester_Class_2:TopPTR:exact *[int:48]:AnyNull:exact *,iid=-55
this=                   Tester_Class_0:AnyNull *
mt=(t meet this)=       java/lang/Object:NotNull:exact *,iid=-55
t_dual=                 Tester_Class_2:exact *[int:48]:NotNull:exact *,iid=55
this_dual=              Tester_Class_0:NotNull *
mt_dual=                java/lang/Object:AnyNull:exact *,iid=55
mt_dual meet t_dual=    Tester_Class_2:exact *[int:48]:NotNull:exact *
mt_dual meet this_dual= java/lang/Object:NotNull *
# To suppress the following error report, specify this argument
# after -XX: or in .hotspotrc:  SuppressErrorAt=/type.cpp:552
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  Internal Error (/net/smite.sfbay/export/ws/baseline/src/share/vm/opto/type.cpp:552), pid=16221, tid=9
#  Error: meet not symmetric
#
# Java VM: OpenJDK 64-Bit Server VM (13.0-b01-never-baseline-jvmg compiled mode solaris-sparc )
# An error report file with more information is saved as:
# /never/hs_err_pid16221.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
Current thread is 9
Dumping core ...
Abort (core dumped)

I think the problem is that mt, which is the value we're going to return, has an instance id which seems like it should have been stripped during the meet.

                                    

Comments
SUGGESTED FIX

Implement lattice based instance_id with Top and Bot values.
Set instance_id to InstanceBot for InstPtr->meet(AryPtr)
(and reverse) when types are not related.
Add missing instance_id arguments.
Rename methods is_instance to is_known_instance.
                                     
2008-06-26
EVALUATION

Incorrect instance_id is used for InstPtr->meet(AryPtr)
(and reverse) when types are not related (return j.l.Object*).
                                     
2008-06-26



Hardware and Software, Engineered to Work Together