On Sat, 27 Jul 2024 11:47:23 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> 
wrote:

>> fabioromano1 has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   More accurate condition for MBI.safeRightShift()
>
> test/micro/org/openjdk/bench/java/math/BigIntegerSquareRoot.java line 74:
> 
>> 72: 
>> 73:         for (int i = 0; i < TESTSIZE; i++) {
>> 74:             int value = Math.abs(r.nextInt());
> 
> There's a risk of an overflow here if the random `int` is `MIN_VALUE`, which 
> would throw an exception later.

The benchmark `BigIntegers.java`, on which I based this, has the same problem.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/19710#discussion_r1693949478

Reply via email to