8072909: TimSort fails with ArrayIndexOutOfBoundsException on arrays longer than 1073741824

Christos Zoulas christos at zoulas.com
Thu Feb 12 17:53:25 UTC 2015


On Feb 12,  4:56pm, lev.priima at oracle.com (Lev Priima) wrote:
-- Subject: Re: 8072909: TimSort fails with ArrayIndexOutOfBoundsException on

| Christos,
| 
| Test may fail on shorter arrays(page 8 of paper). For instance, on worst 
| case, generated by test, it starts to fail on length 67108864.
| After increasing stack size of runs to merge, Arrays.sort(T[]) works 
| also on maximum possible array for HotSpot JVM.
| 
| 
| Roger, David,
| I've updated the test ( 
| http://cr.openjdk.java.net/~lpriima/8072909/webrev.01/test/java/util/Arrays/TimSortStackSize2.java.html 
| ) to make it more suitable for regular execution:
| 
|    27  * @run main/othervm TimSortStackSize2 67108864
|    28  * not for regular execution on all platforms:
|    29  * run main/othervm -Xmx8g TimSortStackSize2 1073741824
|    30  * run main/othervm -Xmx32g TimSortStackSize2 2147483644
| 
| Could you please push this:
| http://cr.openjdk.java.net/~lpriima/8072909/webrev.01/
| ?
| 

Thanks for the explanation Lev!

christos



More information about the core-libs-dev mailing list