8147876: ciTypeFlow::is_dominated_by() writes outside dominated array
authorthartmann
Tue, 26 Jan 2016 10:46:15 +0100
changeset 35602 1513b6586d6d
parent 35599 cc774aa3d2fe
child 35603 152856fa06e1
8147876: ciTypeFlow::is_dominated_by() writes outside dominated array Summary: ciTypeFlow::is_dominated_by() should use block_count() instead of _methodBlocks->num_blocks(). Reviewed-by: neliasso, vlivanov, kvn
hotspot/src/share/vm/ci/ciTypeFlow.cpp
--- a/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Tue Jan 26 09:11:58 2016 +0100
+++ b/hotspot/src/share/vm/ci/ciTypeFlow.cpp	Tue Jan 26 10:46:15 2016 +0100
@@ -2930,7 +2930,7 @@
   }
 
   // Dominated[i] is true if block i is dominated by dom_block
-  int num_blocks = _methodBlocks->num_blocks();
+  int num_blocks = block_count();
   bool* dominated = NEW_RESOURCE_ARRAY(bool, num_blocks);
   for (int i = 0; i < num_blocks; ++i) {
     dominated[i] = true;