Karim Belabas on Mon, 19 Jan 2004 22:58:05 +0100


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

Re: listsort bug


* Bill Allombert <allomber@math.u-bordeaux.fr> [2004-01-18 00:27]:
> On Sat, Jan 17, 2004 at 11:37:27PM +0100, Robert Gerbicz wrote:
[ edited for readability ]
>> ? a=listcreate(5);b=listcreate(5);b=listsort(a,1)
>> %1 = List([369098752])
>> This is a bug since a was an empty list, so b=listsort(a,1) has to be an
>> empty list.
> 
> In fact, this bug can be shortened to
> ? listsort(List([]),1)
>   ***   bug in GP (Segmentation Fault), please report
> 
> Please use ';' to separate commands. ':' is deprecated and may have
> an other meaning in the futur (and has already with gp2c).

With this specific flag, listsort assumed the List had at least one element.

Fixed in CVS.

    Karim.
-- 
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dep. de Mathematiques, Bat. 425   Fax: (+33) (0)1 69 15 60 19
Universite Paris-Sud              http://www.math.u-psud.fr/~belabas/ 
F-91405 Orsay (France)            http://pari.math.u-bordeaux.fr/  [PARI/GP]