Re: GST segfaults when running under GDB

Jan Vrany <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.gnu.general
Message-ID <[email protected]>
On Sat, 2015-02-28 at 18:35 +0100, Holger Hans Peter Freyther wrote:
> On Sat, Feb 28, 2015 at 02:42:27PM +0000, Jan Vrany wrote:
> > Hi, 
> 
> Hi!
> 
> > Is it normal? If so, do I have to setup GDB specially or
> > compile GST specially to be able to debug it?
> 
> Yes that is normal. For the incremental/generational garbage
> collection one needs to know which objects changed since the
> last operation. The classic way is to have a read/write barrier
> (e.g. keep track everytime a pointer is followed to another
> object). The approach Paolo picked was to use mprotect on the
> pages the object is allocated.
> 
> This means that a SIGSEGV will be generated on these objects
> and the garbage collector remembers it.

Ah, yes, I know that. Stupid me, just did not think of it in
this case. Sorry! 

> 
> a.) In gdb you can do:
> 
> handle SIGSEGV nostop noprint
> b abort
> b exit
> 
> b.) You can compile GST with another GC and/or in libgst/oop.h
> force "NO_SIGSEGV_HANDLING"

I'd prefer the former than differently compiled VM.
Thanks a lot! 

Best, Jan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.