Re: 8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-21 Thread Brian Burkhalter
HI Stuart, > On Dec 21, 2018, at 11:49 AM, Stuart Marks wrote: > > On 12/21/18 8:36 AM, Brian Burkhalter wrote: >> I updated the test to use RandomFactory: >> http://cr.openjdk.java.net/~bpb/8215759/webrev.01/ >> > > Oddly enough, changing t

Re: 8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-21 Thread Stuart Marks
On 12/21/18 8:36 AM, Brian Burkhalter wrote: I updated the test to use RandomFactory: http://cr.openjdk.java.net/~bpb/8215759/webrev.01/ Oddly enough, changing this to use RandomFactory instead of the fixed seed makes it MORE likely that the random modulus will be zero. But this is OK, since

Re: 8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-21 Thread Brian Burkhalter
I updated the test to use RandomFactory: http://cr.openjdk.java.net/~bpb/8215759/webrev.01/ Thanks, Brian > On Dec 21, 2018, at 8:22 AM, Brian Burkhalter > wrote: > > Probably you are correct however about the randomness. It should be changed > to use RandomFactory.

Re: 8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-21 Thread Brian Burkhalter
Hi Peter, > On Dec 21, 2018, at 8:15 AM, Peter Levart wrote: > > This is really highly unlikely (1 in 2^800). In fact, it was not possible for > this particular test to produce zero BigInteger. That's because the test uses > a pseudo-random generator with deterministic algorithm and it uses a

Re: 8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-21 Thread Peter Levart
Hi Brian, This is really highly unlikely (1 in 2^800). In fact, it was not possible for this particular test to produce zero BigInteger. That's because the test uses a pseudo-random generator with deterministic algorithm and it uses a constant seed to initialize it before generating the next

Re: 8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-21 Thread Roger Riggs
Hi Brian, The changes look fine. Adding the bugid to @bug helps close the loop, the test failed, a bug was fixed. Happy Holidays, Roger On 12/20/2018 07:36 PM, Brian Burkhalter wrote: https://bugs.openjdk.java.net/browse/JDK-8215759 http://cr.openjdk.java.net/~bpb/8215759/webrev.00/ Althou

8215759: java/math/BigInteger/ModPow.java can throw an ArithmeticException

2018-12-20 Thread Brian Burkhalter
https://bugs.openjdk.java.net/browse/JDK-8215759 http://cr.openjdk.java.net/~bpb/8215759/webrev.00/ Although highly unlikely, the modulus parameter of modPow() can be zero which would provoke an ArithmeticException. Unsure whether I need this bug ID in the @bug list. Thanks, Brian