Borys Bradel's Blog

Garbage collection and debugging

Tags: programming March 7, 2009    

An interesting problem that I encountered while debugging an application is that the application would segfault in the debugger when it did not before. The problem is that the boehm garbage collector uses segfauls to figure out memory layout limits (info can be found here). The SIGSEGVs need to be ignored. If one occurs, it can be continued from (::c in mdb), although given the number of them, the easiest is to list the breakpoints (::events in mdb) and then stop catching SIGSEGVs (::delete 9 in mdb). After no SIGSEGVs lead to breakpoints, the program can continue. A breakpoint can be set for some point after the garbage collector is initialized, and at that point SIGSEGVs can be added to the event list.

Copyright © 2009 Borys Bradel. All rights reserved. This post is only my possibly incorrect opinion.

Previous Next