review request (S): 7116050 C2/ARM: memory stomping error with DivideMcTests
Vladimir Kozlov
vladimir.kozlov at oracle.com
Tue Jan 17 12:03:21 PST 2012
Why not just use "uint max_idx == (uint)ready_cnt.length()" since ready_cnt
can't be changed? You don't need to pass it as argument then.
Vladimir
Roland Westrelin wrote:
> 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