Re: [Gc] Fwd[2]: Re: Stack overflows, Ex: bdwgc SIGSEGV when stack size is exeeded
Frank Pfenning <[email protected]>
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <CAFzeOF6EWsGft98C5i=p2EBeStqCnAJ_GDtkGgcEadDNh2Jq5g@mail.gmail.com> |
If anyone ever figures this out (like to combine libsigsegv with libgc), I would definitely use it for our implementation of C0, a type-safe subset of C extended with contracts for teaching imperative programming. Right now, our autograder cannot tell the difference between a memory error in the student code and exhausted stack space. - Frank On Sat, Apr 12, 2014 at 12:33 AM, Ivan Maidanski <ivmai-JGs/[email protected]> wrote: > > -------- Forwarded message -------- > From: [email protected] > To: Ivan Maidanski <ivmai-JGs/[email protected]> > Date: Thu, 10 Apr 2014 18:11:15 +0200 > Subject: Re: Fwd: [Gc] Stack overflows, Ex: bdwgc SIGSEGV when stack size > is exeeded > > > Am 10.04.2014 15:23 schrieb Ivan Maidanski: > > > -------- Forwarded message -------- > > From: Ingo Albrecht <[email protected]<http://[email protected]> > > > > To: [email protected]<http://compose?To=bdwgc-ZwoEplunGu1I4Lznb4ZCK0B+6BGkLq7r@public.gmane.org> > > Date: Thu, 10 Apr 2014, 01:18 +04:00 > > Subject: [Gc] Stack overflows, Ex: bdwgc SIGSEGV when stack size is > > exeeded > > > > 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 > > > > _______________________________________________ > > bdwgc mailing list > > [email protected] <http://compose?To=bdwgc-ZwoEplunGu1I4Lznb4ZCK0B+6BGkLq7r@public.gmane.org> > > https://lists.opendylan.org/mailman/listinfo/bdwgc > > Thanks. Much appreciated and I'll look at the things you suggested. > Perhaps this is an idea for a future development. Being able to set a > max stack size and have the GC return gracefully if it tries to exceed > that limit. But I should also mention that the GC is very useful! Also > thanks for the mailing list, I was not aware of it. > > ------------------------------ > > _______________________________________________ > bdwgc mailing list > [email protected] > https://lists.opendylan.org/mailman/listinfo/bdwgc > -- Frank Pfenning, Professor and Head Department of Computer Science Carnegie Mellon University Pittsburgh, PA 15213-3891 http://www.cs.cmu.edu/~fp +1 412 268-6343 GHC 7019 _______________________________________________ bdwgc mailing list [email protected] https://lists.opendylan.org/mailman/listinfo/bdwgc