handling alloca overflow (Re: [Patch 21.4] native cygwin xemacs-21.4.19 segfaults when requiring un-define)

Aidan Kehoe kehoea at parhasard.net
Thu Aug 3 04:25:22 EDT 2006


 Ar an dara lá de mí Lúnasa, scríobh Ben Wing: 

 > aidan and/or steve, how can your stack be so small that a 160K 
 > allocation is hosing it? how much memory do you have in your machine, 
 > what OS?

Steve doesn’t have Cygwin, which is where this behaviour happens. I was
wrong in what I said on the size of the allocation; it’s 79648 times two
_times the size of an int,_ which is 637k.

 > also, 21.5 lisp.h has various other ways to explicitly do what the code 
 > below is trying to do; these all use an unwind-protect so they're 
 > guaranteed safe. they include MALLOC_OR_ALLOCA (which uses alloca() over 
 > a certain size, currently 64K), or xmalloc_and_record_unwind(), which 
 > just always allocates.
 > 
 > you might consider copying some of this code into 21.4 and using it.

If changing to malloc() solves the problem, which seems to be the case,
doing something so invasive is overkill, I think. 

-- 
Santa Maradona, priez pour moi!




More information about the XEmacs-Beta mailing list