Re: GST segfaults when running under GDB
Holger Hans Peter Freyther <[email protected]>
| Newsgroups | gmane.comp.lang.smalltalk.gnu.general |
|---|---|
| Message-ID | <[email protected]> |
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. 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"