United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6896727 nsk/logging/LoggingPermission/LoggingPermission/logperm002 fails with G1, EscapeAnalisys w/o COOPs
JDK-6896727 : nsk/logging/LoggingPermission/LoggingPermission/logperm002 fails with G1, EscapeAnalisys w/o COOPs

Details
Type:
Bug
Submit Date:
2009-10-30
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs17
Fixed Versions:
hs17 (b06)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The test 
nsk/logging/LoggingPermission/LoggingPermission/logperm002
fails since b71 when G1 and EscapeAnalysis are used. Also for 64 Compressed OOPs should be off.

The reference to variable "testString" from array "params" is null inside try/catch in the for loop (it it ok without try/catch). See sample below.

Here is sample of this issue:
/net/vmsqe.russia/export/jdk/re/7/promoted/ea/b71/binaries//solaris-amd64/bin/java -Xcomp  -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC  -XX:+DoEscapeAnalysis logperm002

Here is short version of test:
======================== logperm002.java ==================

public class logperm002 {

    final static String testString = "abracadabra";
    public static void main(String args[]) {
        String params[][] = {
            {"control", testString}
        };
        for (int i=0; i<params.length; i++) {
            try {
                System.out.println("Params :" + testString + " and " + params[i][0] + ", " + params[i][1]);
            } catch (Exception e) {}    
        }
    }
}

                                    

Comments
EVALUATION

EA incorrectly allows to bypass one memory store by an other which could be related.
In the test case the store params[0][] = String[2] bypassed the store String[1] = testString;
As result testString store is scheduled incorrectly by GCM inside G1 postbarrier code (neart depending StoreCM)
since the merge memory after the barrier does not have reference to it.
                                     
2009-11-02
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/7fee0a6cc6d4
                                     
2009-12-10
PUBLIC COMMENTS

Problem:
EA incorrectly allows to bypass one memory store by an other
without updating its users. As result node's memory references
could missing on some paths.

Solution:
When updating input memory edge for a store move
its memory users to corresponding memory slices.
I also added several asserts to verify correctness
of memory splitting during EA.
                                     
2009-12-11



Hardware and Software, Engineered to Work Together