Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)

2020-02-23 Thread Steven Robbins
On Sunday, February 23, 2020 2:32:49 P.M. CST John Scott wrote:
> On February 23, 2020 3:11:46 PM EST, Marco Bodrato 
 wrote:
> >Ciao,
> >
> >Il Dom, 9 Febbraio 2020 9:34 pm, Steven Robbins ha scritto:
> >> On Sunday, February 9, 2020 9:54:02 A.M. CST Marco Bodrato wrote:

> >It seems to me that all packages incorrectly using the internal
> >representation and not the documented interface of GMP where patched.
> >
> >What else stops migration of GMP to testing? Maybe a release of GMP
> >
> >explicitly saying that it breaks:
> > libmath-gmp-perl < 2.20
> > libmath-prime-util-gmp-perl < 0.51-2
> > postgresql-pgmp < 1.0.4
> >
> >is needed? So that nobody will update the library without updating also
> >the other possibly failing packages?
> >
> >Ĝis,
> >m
> 
> GMP is not migrating because this bug was marked as done by uploading
> postgresql-pgmp. However, this bug is filed against GMP, so the bug
> metadata still suggests that GMP 6.2.0 introduces this serious issue.

Right.  I have tried twice to close the bug, with no apparent effect.  Perhaps 
with Marco's suggestion of a new upload containing specific breaks will let me 
close it against a new revision of gmp.

-Steve


signature.asc
Description: This is a digitally signed message part.


Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)

2020-02-23 Thread John Scott
On February 23, 2020 3:11:46 PM EST, Marco Bodrato  
wrote:
>Ciao,
>
>Il Dom, 9 Febbraio 2020 9:34 pm, Steven Robbins ha scritto:
>> On Sunday, February 9, 2020 9:54:02 A.M. CST Marco Bodrato wrote:
>>> So, if the new release of the library is able to answer that the number
>>> 387047 is prime, and not only "probably" prime... This should not be
>>> marked as a regression...
>>
>> Indeed!  Thanks for investigating.  An improvement could be simply that
>
>> Is there a bug for libmath-gmp-perl for this test suite issue?
>
>It seems to me that all packages incorrectly using the internal
>representation and not the documented interface of GMP where patched.
>
>What else stops migration of GMP to testing? Maybe a release of GMP
>explicitly saying that it breaks:
> libmath-gmp-perl < 2.20
> libmath-prime-util-gmp-perl < 0.51-2
> postgresql-pgmp < 1.0.4
>is needed? So that nobody will update the library without updating also
>the other possibly failing packages?
>
>Ĝis,
>m
>

GMP is not migrating because this bug was marked as done by uploading 
postgresql-pgmp. However, this bug is filed against GMP, so the bug metadata 
still suggests that GMP 6.2.0 introduces this serious issue.



Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)

2020-02-23 Thread Marco Bodrato
Ciao,

Il Dom, 9 Febbraio 2020 9:34 pm, Steven Robbins ha scritto:
> On Sunday, February 9, 2020 9:54:02 A.M. CST Marco Bodrato wrote:
>> So, if the new release of the library is able to answer that the number
>> 387047 is prime, and not only "probably" prime... This should not be
>> marked as a regression...
>
> Indeed!  Thanks for investigating.  An improvement could be simply that

> Is there a bug for libmath-gmp-perl for this test suite issue?

It seems to me that all packages incorrectly using the internal
representation and not the documented interface of GMP where patched.

What else stops migration of GMP to testing? Maybe a release of GMP
explicitly saying that it breaks:
 libmath-gmp-perl < 2.20
 libmath-prime-util-gmp-perl < 0.51-2
 postgresql-pgmp < 1.0.4
is needed? So that nobody will update the library without updating also
the other possibly failing packages?

Ĝis,
m

-- 
http://bodrato.it/papers/



Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)

2020-02-09 Thread Steven Robbins
On Sunday, February 9, 2020 9:54:02 A.M. CST Marco Bodrato wrote:
> Ciao,
> 
>  From
> https://ci.debian.net/data/autopkgtest/testing/arm64/libm/libmath-gmp-perl/4
> 229384/log.gz I read the following:
> 
> #   Failed test 'Test worked: $x =
> Math::GMP->new("387047");Math::GMP::probab_prime($x,25);'
> #   at t/01_gmppm.t line 192.
> #  got: '2'
> # expected: '1'
> 
> 
>  From the manual of GMP
> https://gmplib.org/manual/Number-Theoretic-Functions.html I read the
> following:
> 
> Function: int mpz_probab_prime_p (const mpz_t n, int reps)
>  Determine whether n is prime. Return 2 if n is definitely prime,
> return 1 if n is probably prime (without being certain), or return 0 if
> n is definitely non-prime.
> 
> So, if the new release of the library is able to answer that the number
> 387047 is prime, and not only "probably" prime... This should not be
> marked as a regression...

Indeed!  Thanks for investigating.  An improvement could be simply that all 
tests of this function (and any similar?) should be written to expect non-
zero, rather than superficially 1 or 2.

Is there a bug for libmath-gmp-perl for this test suite issue?

Best,
-Steve


signature.asc
Description: This is a digitally signed message part.


Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)

2020-02-09 Thread Marco Bodrato

Ciao,

From 
https://ci.debian.net/data/autopkgtest/testing/arm64/libm/libmath-gmp-perl/4229384/log.gz 
I read the following:


#   Failed test 'Test worked: $x = 
Math::GMP->new("387047");Math::GMP::probab_prime($x,25);'

#   at t/01_gmppm.t line 192.
#  got: '2'
# expected: '1'


From the manual of GMP 
https://gmplib.org/manual/Number-Theoretic-Functions.html I read the 
following:


Function: int mpz_probab_prime_p (const mpz_t n, int reps)
Determine whether n is prime. Return 2 if n is definitely prime, 
return 1 if n is probably prime (without being certain), or return 0 if 
n is definitely non-prime.


So, if the new release of the library is able to answer that the number 
387047 is prime, and not only "probably" prime... This should not be 
marked as a regression...



Ĝis,
m



Bug#950608: gmp 6.2.0 crashes postgresql-pgmp (& others)

2020-02-06 Thread Steven Robbins
Hello Christoph,

On Thursday, February 6, 2020 3:43:41 A.M. CST Christoph Berg wrote:
> Re: Steven Robbins 2020-02-06 <4839510.uz11uGdL23@riemann>
> 
> > > the new gmp version makes postgresql-pgmp crash on arm64:
> > > 
> > > https://ci.debian.net/data/autopkgtest/testing/arm64/p/postgresql-pgmp/

> the postgresql-pgmp author found a fix so this isn't an issue anymore:
> 
> https://github.com/dvarrazzo/pgmp/issues/18
> https://github.com/dvarrazzo/pgmp/commit/04274c40b63d3dff758bee47c8525112d64
> d1ab2
> 
> I don't know the gmp internals, but I guess this fix might be
> applicable to other gmp users as well if they have problems.

Thank you!  This is very helpful -- there are three other autopkgtests failing 
with GMP 6.2 (packages in cc).  Maybe these are also triggered by a change in 
GMP: https://gmplib.org/list-archives/gmp-announce/2020-January/48.html

Best,
-Steve


signature.asc
Description: This is a digitally signed message part.