[Gc] Stack overflows, Ex: bdwgc SIGSEGV when stack size is exeeded
Ingo Albrecht <[email protected]>
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
On 04/09/2014 01:12 PM, Ivan Maidanski wrote: > > I am wondering if there is by any chances a way for a soft(er) landing > if the stack space is exhausted? I believe the cause to be in the stack > size, since setting a ulimit -s changes the point in time when the > program crashes. The program is an interpreter and is given a recursive > definition - so it is expected that something bad happens; I am just > trying to figure out what my options are to not crash to hard or at > least print a diagnostic message or something. > > I'd apprechiate any comments you may have. > It might be possible to use protocols from libraries like this one: http://libsigsegv.sourceforge.net/ AFAIK, this library has been created for CLISP. I've had some good experience with it in (non-GC) C++ projects. Currently, it probably collides with BDWGC signal handling or might be dependent on a specific initialization order. But it might be possible to figure out how to use it with BDWGC portably. Greetings prom