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
--- 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;