United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7045693 java/util/EnumSet/EnumSetBash.java still failing intermittently
JDK-7045693 : java/util/EnumSet/EnumSetBash.java still failing intermittently

Details
Type:
Bug
Submit Date:
2011-05-17
Status:
Closed
Updated Date:
2011-09-22
Project Name:
JDK
Resolved Date:
2011-07-18
Component:
hotspot
OS:
generic,solaris_10
Sub-Component:
compiler
CPU:
sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs21,7
Fixed Versions:
hs21 (b15)

Related Reports
Backport:
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

Description
java/util/EnumSet/EnumSetBash.java
still failing with same reasons as in 7001576

Since it was test bug I filed only P4

java.lang.RuntimeException: Set not equal to copy. 1
	at EnumSetBash.fail(EnumSetBash.java:190)
	at EnumSetBash.clone(EnumSetBash.java:145)
	at EnumSetBash.bash(EnumSetBash.java:64)
	at EnumSetBash.main(EnumSetBash.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at com.sun.javatest.regtest.MainWrapper$MainThread.run(MainWrapper.java:94)
	at java.lang.Thread.run(Thread.java:722)

JavaTest Message: Test threw exception: java.lang.RuntimeException: Set not equal to copy. 1
JavaTest Message: shutting down test

STATUS:Failed.`main' threw exception: java.lang.RuntimeException: Set not equal to copy. 1
result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Set not equal to copy. 1


test result: Failed. Execution failed: `main' threw exception: java.lang.RuntimeException: Set not equal to copy. 1

                                    

Comments
SUGGESTED FIX

src/share/vm/opto/loopTransform.cpp	Wed May 18 15:31:20 2011 -0700
@@ -1292,9 +1292,23 @@
       }
       assert(new_limit != NULL, "");
       // Replace in loop test.
-      _igvn.hash_delete(cmp);
-      cmp->set_req(2, new_limit);
-
+      assert(loop_end->in(1)->in(1) == cmp, "sanity");
+      if (cmp->outcnt() == 1 && loop_end->in(1)->outcnt() == 1) {
+        // Don't need to create new test since only one user.
+        _igvn.hash_delete(cmp);
+        cmp->set_req(2, new_limit);
+      } else {
+        // Create new test since it is shared.
+        Node* ctrl2 = loop_end->in(0);
+        Node* cmp2  = cmp->clone();
+        cmp2->set_req(2, new_limit);
+        register_new_node(cmp2, ctrl2);
+        Node* bol2 = loop_end->in(1)->clone();
+        bol2->set_req(1, cmp2);
+        register_new_node(bol2, ctrl2);
+        _igvn.hash_delete(loop_end);
+        loop_end->set_req(1, bol2);
+      }
       // Step 3: Find the min-trip test guaranteed before a 'main' loop.
       // Make it a 1-trip test (means at least 2 trips).
                                     
2011-05-18
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-comp/hotspot/rev/789d04408ca3
                                     
2011-05-21
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/789d04408ca3
                                     
2011-05-23
EVALUATION

http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/789d04408ca3
                                     
2011-06-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/789d04408ca3
                                     
2011-06-09
WORK AROUND

Passed with -XX:-UnrollLimitCheck.
                                     
2011-05-18
EVALUATION

In my changes for 5091921 I forgot that Bool node could be shared. New limit for unrolled loop should be set only for zero trip guard and loop iteration test.
                                     
2011-05-18



Hardware and Software, Engineered to Work Together