Karim BELABAS on Wed, 4 Dec 2002 22:48:51 +0100 (MET)


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

Re: memory management bug


On Wed, 4 Dec 2002, Igor Schein wrote:
> ? ff(n)=local(v=[],w=[]);n
> ? f(n)=n
> ? ff(f(n))=n
>   ***   bug in GP (Segmentation Fault), please report
>
> I am able to reproduce it only on Linux.  FreeBSD gives a helpful
> warning, indicating the nature of the problem:
>
> ? ff(n)=local(v=[],w=[]);n
> ? f(n)=n
> ? ff(f(n))=n
> gp in free(): warning: chunk is already free
> gp in free(): warning: chunk is already free
>   ***   unknown function or error in formal parameters: ff(f(n))=n

Indeed (ep->args freed twice when we redefine routine which had default
arguments, and an error occurs).

Better now ?

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/