[Top][All Lists]

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

[Gcl-devel] Re: funny bug in gcl -- probably in cons garbage collection

From: Camm Maguire
Subject: [Gcl-devel] Re: funny bug in gcl -- probably in cons garbage collection
Date: 17 Dec 2004 18:55:01 -0500
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2


Yes, you are running out of C stack space.  Currently, GCL uses the
system setrlimit to limit the stack space to some supposedly
reasonable function of MAXPAGE.  Leaving it completely unlimited lead
to memory allocation problems in the heap if memory serves.  There is
code in place, currently unfunctional but fixed in a patch I have
lying around as yet uncommitted, which uses the SIGAL_TSTACK mechanism
to report C stack exhaustion in a reasonable manner and allow the user
to abort.  This has definitely got to go in to 2.7.0 (hope I don't
forget, there is so much to do...).  Likewise, I have a branch lying
around which enables gcc to write stack-consumption-less mutual tail
recursion calls where possible.  This should go in too, though it
might be of a lower priority, and makes the C code look a bit ugly.

Beyond, these, we should probably have an algorithm which will allow
the stack to scale with the user's ulimit -s settings in the calling
shell and only curtail when we might run into other memory areas.  The
problem is of course making this portable to 12+ architectures.

Suggestions as always most welcome.  If this is a pressing issue for
you, please advise and we will try to get in a solution more quickly.  

Right now I'm working on type propagation and optimization in the
compiler, with some promising results thus far.  Not sure if this
really matters to anyone, though :-).

Take care,

Robert Boyer <address@hidden> writes:

> Hi Camm,
> % /p/bin/gcl
> GCL (GNU Common Lisp)  2.6.5 CLtL1    Aug 18 2004 10:07:03
> Source License: LGPL(gcl,gmp), GPL(unexec,bfd)
> Binary License:  GPL due to GPL'ed components: (BFD UNEXEC)
> Modifications of this banner must retain notice of a compatible license
> Dedicated to the memory of W. Schelter
> Use (help) to get some basic information on how to use GCL.
> >(setq x nil)
> >(loop for i from 1 to 1000000 do (setq x (cons x x)))
> Segmentation fault
> % 
> Bob and Warren
> P. S.  Using (cons nil x) instead of (cons x x) does not seem to cause
> the problem.

Camm Maguire                                            address@hidden
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah

reply via email to

[Prev in Thread] Current Thread [Next in Thread]