RFR 8214124: [TESTBUG] Bugs in runtime/NMT/MallocStressTest.java
Zhengyu Gu
zgu at redhat.com
Tue Nov 20 17:03:21 UTC 2018
Thanks, Thomas.
-Zhengyu
On 11/20/18 12:00 PM, Thomas Stüfe wrote:
> Hi Zhengyu,
>
> looks good. It is also cleaner.
>
> Thanks, Thomas
>
> On Tue, Nov 20, 2018 at 5:48 PM Zhengyu Gu <zgu at redhat.com> 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/
>>
>>
>> [1] https://docs.oracle.com/javase/7/docs/api/java/lang/Math.html#abs(int)
>>
>> Thanks,
>>
>> -Zhengyu
More information about the hotspot-runtime-dev
mailing list