Gerhard Niklasch on Tue, 31 Mar 1998 03:58:05 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: 2.0.7 bug?

PARI-GP 24hrs,7days online maintenance service here, how can I help

In response to:
> Message-Id: <>
> Date: 	Tue, 31 Mar 1998 01:50:21 +0200
> From: Roland Dreier <>
> ? matsnf(M)
>   ***   segmentation fault: bug in GP (please report).

Thanks for reporting;  yup, this is a bug.

If you play around with it a bit more you'll note that it happens if
and only if the matrix is singular.  (I hope!)

If you play around with a version built for debugging, under gdb or
similar, you'll notice that it bombs out in smithall(), at line 1082
of src/basemath/base1.c  (in the gcoeff macro in fact).  If you look
at the code in the preceding lines, it becomes obvious why it does
this -- the current version goes through an Hermite reduction first,
using a function which will return a non-square matrix when the input
was singular  (omitting any all-zeros columns instead of carrying them

I'll think about a fix when the clock for my timezone shows a somewhat
less outrageous hour. ;^)  (Such things have a knack for happening
when Karim is traveling or moving...)

Just out of curiosity -- has anyone seen related-looking segfaults during
class group computations?  (I can't say offhand whether this bug could be
triggered during those;  Karim would probably know...)

Cheers, Gerhard