changeset 4537:6a3629cf7075

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
author roland
date Wed, 24 Apr 2013 09:42:08 +0200
parents 35c15dad89ea
children 47766e2d2527
files src/share/vm/c1/c1_RangeCheckElimination.cpp
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/c1/c1_RangeCheckElimination.cpp	Tue Apr 16 17:06:39 2013 +0200
+++ b/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();
   }
 }