[plt-scheme] how to trace a segmentation fault?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Thu May 7 14:58:48 EDT 2009

At Thu, 7 May 2009 11:48:59 -0700, YC wrote:
> I've been experiencing a few segmentation faults lately and not sure what
> triggered it.  This is again an intermittent issue (like the previous thread
> hanging problem), but I currently have no way to reproduce it yet (the
> process runs a job in the background repeatly without human interaction).
> 
> Are there ways to determine where the segmentation fault occured as it
> occured?

Try enabling core files (possibly `ulimit -c' in sh, definitely
`unlimit core' in csh). Then, after a crash, you can call gdb with the
executable and core file, and use `where' to get a C-level stack trace.
That might provide some useful hints.



Posted on the users mailing list.