| Karim BELABAS on Mon, 17 Apr 2000 19:07:29 +0200 (MET DST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: bug report |
[Cliff Bergman:]
> Hello. I just (twice) got an error starting from a clean invocation of gp
> 2.0.17 (under Redhat Linux 6.1) after the following computations:
>
> ? ec=[0,0,0,-Mod(1,13),-Mod(3,13)]
> %1 = [0, 0, 0, Mod(12, 13), Mod(10, 13)]
> ? c=ellinit(ec,1)
> %2 = [0, 0, 0, Mod(12, 13), Mod(10, 13), 0, Mod(11, 13), Mod(1, 13), Mod(12, 13), Mod(9, 13), Mod(5, 13), Mod(11, 13), Mod(6, 13)]
> ? c.disc
> %3 = Mod(11, 13)
> ? c.roots
> *** segmentation fault: bug in GP (please report).
>
> I'm just doing as requested: reporting the error. Enjoy!
Hi,
as Gerhard Niklasch already mentioned on pari-dev, this is simply a matter
of an expected component not being there (and the member function forgetting
to check about it...). I corrected the problem on the CVS version a few
minutes ago:
(17:49) gp > c.roots
*** incorrect type in .roots: c.roots
^-----
I double checked all member functions and found a number of other examples
where "random" input could wreak havoc (but you found the simplest one, by
far!). I tried to make sure segmentation faults are always avoided when a
structure component is requested, whatever the input [ This is easy and cheap
whereas the corresponding behaviour is currently unattainable for library
mode functions, given PARI's (very weak) notion of "type checking" ].
Cheers,
Karim.
__
Karim Belabas email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France) Fax: (00 33) 1 69 15 60 19
--
PARI/GP Home Page: http://www.parigp-home.de/