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

2023-09-15 Thread Aleksey Shipilev
On Tue, 29 Aug 2023 20:00:49 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

Re: RFR: 8314236: Overflow in Collections.rotate

2023-09-15 Thread Nikita Sakharin
On Mon, 14 Aug 2023 20:23:13 GMT, Aleksey Shipilev 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

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

2023-09-14 Thread Aleksey Shipilev
On Tue, 29 Aug 2023 20:00:49 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

Re: RFR: 8314236: Overflow in Collections.rotate

2023-09-13 Thread Nikita Sakharin
On Mon, 14 Aug 2023 20:23:13 GMT, Aleksey Shipilev 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

Re: RFR: 8314236: Overflow in Collections.rotate

2023-08-30 Thread Nikita Sakharin
On Mon, 14 Aug 2023 20:23:13 GMT, Aleksey Shipilev 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

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

2023-08-29 Thread Stuart Marks
On Tue, 29 Aug 2023 20:00:49 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

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

2023-08-29 Thread Nikita Sakharin
On Tue, 29 Aug 2023 03:02:56 GMT, Stuart Marks wrote: >> Nikita Sakharin has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains one commit: >> >> fix overflow in Collections.rotate and write tests > > (The bot has already admonished

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

2023-08-29 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);

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

2023-08-28 Thread Stuart Marks
On Fri, 25 Aug 2023 13:20:54 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

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

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

2023-08-25 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);

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

2023-08-25 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);

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

2023-08-24 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);

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

2023-08-24 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);

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

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

2023-08-18 Thread Nikita Sakharin
On Wed, 16 Aug 2023 21:38:09 GMT, Stuart Marks wrote: >> Thanks! Done > > @nikita-sakharin > > Thanks for finding this bug and offering to fix it! (And @shipilev thanks for > your assistance on this.) > > Putting the test into a separate JVM will work, but I don't think it's > necessary to

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

2023-08-18 Thread Nikita Sakharin
On Tue, 15 Aug 2023 09:54:48 GMT, Aleksey Shipilev wrote: >> Nikita Sakharin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8314236: change bug number and summary > > src/java.base/share/classes/java/util/Collections.java line 810: >

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

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

2023-08-17 Thread Aleksey Shipilev
On Wed, 16 Aug 2023 21:38:09 GMT, Stuart Marks wrote: >> test/jdk/java/util/Collections/RotateHuge.java line 27: >> >>> 25: * @test >>> 26: * @bug 8314236 >>> 27: * @summary Overflow in Collections.rotate >> >> Since this test takes >4G of heap to hold the list with compressed oops, and >>

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

2023-08-16 Thread Stuart Marks
On Tue, 15 Aug 2023 09:51:40 GMT, Aleksey Shipilev wrote: >> Nikita Sakharin has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8314236: change bug number and summary > > test/jdk/java/util/Collections/RotateHuge.java line 27: > >> 25: *

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

2023-08-15 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);

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

2023-08-15 Thread Aleksey Shipilev
On Tue, 15 Aug 2023 09:45:43 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

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

2023-08-15 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);

RFR: 8314236: Overflow in Collections.rotate

2023-08-14 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);

Re: RFR: 8314236: Overflow in Collections.rotate

2023-08-14 Thread Aleksey Shipilev
On Mon, 14 Aug 2023 12:56:46 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<>(size);