guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

libgc and valgrind


From: Julian Graham
Subject: libgc and valgrind
Date: Fri, 12 Nov 2010 12:22:54 -0500

Hi Guilers,

I wanted to report some success with using Valgrind to debug memory
issues in Guile HEAD.  In case you weren't aware, none of the current
public releases of libgc play well with valgrind, leading to
segmentation faults in the call chain originating from
`scm_init_guile'.  No Itisnt did some investigation earlier this year
[0] and came up with a patch against libgc CVS [1] that makes libgc
more compatible with valgrind's address space relocation mechanism.
The functionality added by the patch is controlled by the
USE_GET_STACKBASE_FOR_MAIN preprocessor define (mentioned briefly
[2]); I found that doing

  export CFLAGS=-DUSE_GET_STACKBASE_FOR_MAIN

before running `configure' and `make' was the easiest way to enable it.

Let me know if you have any trouble getting this to work.  I've
already been able to use Valgrind to detect a buffer over-read in
read.c.


Regards,
Julian

[0] - 
http://comments.gmane.org/gmane.comp.programming.garbage-collection.boehmgc/3788
[1] - http://sourceforge.net/projects/bdwgc/develop
[2] - http://www.mail-archive.com/address@hidden/msg05133.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]