From: Christian Kellermann <[email protected]> Subject: Re: [Chicken-hackers] [PATCH] fix stack-overflow check Date: Mon, 13 Aug 2012 13:04:39 +0200
> * felix winkelmann <[email protected]> [120813 12:34]: >> The attached patch fixes the computation of stack depth beyond >> C_stack_limit. The old way of calculating the depth could overflow if >> the stack is located very high in memory. This was causing incorrect >> stack-overflow errors on some 64-bit systems (sparc64 and x86-64). The >> new method checks whether the stack-pointer is beyond the limit >> computed at startup, including a 64k "slack" area to allow (modestly) >> deep recursions in direct-call-optimized (simple, non-allocating, not >> externally visible) procedures, if the nursery is already mostly >> exhausted. >> >> This patch fixes ticket #895. >> >> I recommend to include this fix in the upcoming 4.8.0 release (this will >> require a new release candidate). > > A minor nitpick from my side.... > > >> +#define C_stack_overflow_check C_stack_check1(C_stack_overflow()) >> + >> +/*XXX OBSOLETE */ >> +#define C_stack_check C_stack_overflow_check >> + > > According to "git grep C_stack_check" the only places where that > string is used is in the places where you replace it. Why not remove > it? Is it part of the API? It is part of the API used by already existing C files, generated by earlier versions of "chicken". I don't know whether this is a real problem in practice, but it avoids requiring a recompile. cheers, felix _______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
