Re: RFR: 8314236: Overflow in Collections.rotate [v4]

2023-08-25 Thread Nikita Sakharin
On Thu, 24 Aug 2023 02:36:52 GMT, Stuart Marks wrote: >> Nikita Sakharin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8314236: rewrite test > > @nikita-sakharin > > Thanks for the updates. With the "Mock List" implementation we can r

Re: RFR: 8314236: Overflow in Collections.rotate [v4]

2023-08-23 Thread Stuart Marks
On Thu, 17 Aug 2023 10:54:07 GMT, Nikita Sakharin wrote: >> `Collections.rotate` method contains a bug. This method throws >> IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way >> to reproduce: >> >> final int size = (1 << 30) + 1; >> final List list = new ArrayList<>(s

Re: RFR: 8314236: Overflow in Collections.rotate [v4]

2023-08-17 Thread Nikita Sakharin
> `Collections.rotate` method contains a bug. This method throws > IndexOutOfBoundsException on arrays larger than $2^{30}$ elements. The way to > reproduce: > > final int size = (1 << 30) + 1; > final List list = new ArrayList<>(size); > for (int i = 0; i < size; ++i) > list.add((byte) 0);