8011771: runThese crashed with EAV
authorroland
Wed, 24 Apr 2013 09:42:08 +0200
changeset 17036 4818f717d362
parent 17035 6bc3ba037e8a
child 17037 34baf792b14d
8011771: runThese crashed with EAV Summary: Array bound check elimination's in block motion doesn't always reset its data structures from one step to the other. Reviewed-by: kvn, twisti
hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp
--- a/hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp	Tue Apr 16 17:06:39 2013 +0200
+++ b/hotspot/src/share/vm/c1/c1_RangeCheckElimination.cpp	Wed Apr 24 09:42:08 2013 +0200
@@ -459,7 +459,7 @@
 
     // Iterate over all different indices
     if (_optimistic) {
-      for (int i=0; i<indices.length(); i++) {
+      for (int i = 0; i < indices.length(); i++) {
         Instruction *index_instruction = indices.at(i);
         AccessIndexedInfo *info = _access_indexed_info[index_instruction->id()];
         assert(info != NULL, "Info must not be null");
@@ -531,9 +531,7 @@
             remove_range_check(ai);
           }
         }
-        _access_indexed_info[index_instruction->id()] = NULL;
       }
-      indices.clear();
 
       if (list_constant.length() > 1) {
         AccessIndexed *first = list_constant.at(0);
@@ -560,6 +558,13 @@
         }
       }
     }
+
+    // Clear data structures for next array
+    for (int i = 0; i < indices.length(); i++) {
+      Instruction *index_instruction = indices.at(i);
+      _access_indexed_info[index_instruction->id()] = NULL;
+    }
+    indices.clear();
   }
 }