RFR 8214124: [TESTBUG] Bugs in runtime/NMT/MallocStressTest.java

Zhengyu Gu zgu at redhat.com
Tue Nov 20 17:05:26 UTC 2018


Thanks, Aleksey.

-Zhengyu

On 11/20/18 12:03 PM, Aleksey Shipilev 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
> 


More information about the hotspot-runtime-dev mailing list