From 7c47f93b1a99751a91333ed1a3f2d3fda2d527d2 Mon Sep 17 00:00:00 2001 From: roland Date: Wed, 24 Apr 2013 09:42:08 +0200 Subject: [PATCH] 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 --- src/share/vm/c1/c1_RangeCheckElimination.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/share/vm/c1/c1_RangeCheckElimination.cpp b/src/share/vm/c1/c1_RangeCheckElimination.cpp index 40c448a39..12cdce62f 100644 --- a/src/share/vm/c1/c1_RangeCheckElimination.cpp +++ b/src/share/vm/c1/c1_RangeCheckElimination.cpp @@ -459,7 +459,7 @@ void RangeCheckEliminator::in_block_motion(BlockBegin *block, AccessIndexedList // Iterate over all different indices if (_optimistic) { - for (int i=0; iid()]; assert(info != NULL, "Info must not be null"); @@ -531,9 +531,7 @@ void RangeCheckEliminator::in_block_motion(BlockBegin *block, AccessIndexedList 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 @@ void RangeCheckEliminator::in_block_motion(BlockBegin *block, AccessIndexedList } } } + + // 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(); } } -- GitLab