RFR 8214124: [TESTBUG] Bugs in runtime/NMT/MallocStressTest.java
Thomas Stüfe
thomas.stuefe at gmail.com
Tue Nov 20 17:13:39 UTC 2018
On Tue, Nov 20, 2018 at 6:04 PM Aleksey Shipilev <shade at redhat.com> wrote:
>
> On 11/20/18 5:48 PM, Zhengyu Gu wrote:
> > This test assumes Math.abs(random.nextInt()) >= 0, but it is *not* always true, as
> > Math.abs(Integer.MIN_VALUE) == Integer.MIN_VALUE, which is a negative value [1].
> >
> > The first instance could result miscounting of allocation size and the second one could result index
> > OOB.
> >
> > Bug: https://bugs.openjdk.java.net/browse/JDK-8214124
> > Webrev: http://cr.openjdk.java.net/~zgu/8214124/webrev.00/
>
> Looks good.
>
> Fun trivia: we have been ripping our hairs out recently chasing a similar testbug in Shenandoah
> tests: http://mail.openjdk.java.net/pipermail/shenandoah-dev/2018-October/007916.html
>
> -Aleksey
>
So that's why I had that deja-vu feeling :)
More information about the hotspot-runtime-dev
mailing list