review request (S): 7116050 C2/ARM: memory stomping error with DivideMcTests

Roland Westrelin roland.westrelin at oracle.com
Tue Jan 17 08:43:20 PST 2012


http://cr.openjdk.java.net/~roland/7116050/webrev.00/

Block::schedule_local() creates new nodes and they need to be skipped so that the VM doesn't write beyond the end of the ready_cnt array (following 7077312). The current code has a test to prevent it:

if (m->_idx > max_idx) {

max_idx is set to matcher.C->unique() in Block::schedule_local() so it may change with every block and it doesn't fully prevent a write beyond the end of the array. Also the test should be a >= rather than a > because max_idx is the size of the ready_cnt array.

Also isn't it better to use an intArray rather than int[] array so that similar issues are not missed in the future?

Roland.


More information about the hotspot-compiler-dev mailing list