Hi folks, I've recently been working on greatly expanding the Guile Scheme API to libgeda, the shared library in the gEDA suite [1]. Unfortunately, I need your help. I've added a testsuite for the libgeda Scheme API. In one commit [2], the testsuite succeeds. In the following commit [3], a test which does not touch any of the changed code starts causing a segfault in the Guile interpreter. I am using Guile 1.8.7 on Fedora Linux (guile-1.8.7-5.fc13.i686). I've recompiled the package from the official spec file with the `--enable-debug' flag. I can reliably reproduce the problem as follows: git clone git://repo.or.cz/geda-gaf/peter-b.git cd peter-b git checkout -t origin/guile-scheme-api ./autogen.sh && ./configure make version.h # This avoids building whole package (cd libgeda && make check) # Segfault in t0015-object-complex.scm git checkout HEAD^ (cd libgeda && make check) # Succeeds What I've tried so far: 1. Running the test under gdb: srcdir=libgeda/scheme \ libtool --mode=execute gdb --args libgeda/shell/geda-shell -q \ -L libgeda/scheme \ -s libgeda/scheme/unit-tests/t0015-object-complex.scm Works perfectly. 2. Running the test under gdb in a different way: srcdir=libgeda/scheme \ libtool --mode=execute gdb --args libgeda/shell/geda-shell -q \ -L libgeda/scheme \ -c '(load (cadr (command-line)))' \ libgeda/scheme/unit-tests/t0015-object-complex.scm Also works perfectly. 2. Running the test under gdb in a third way (this is the same way it's run by `make check'): srcdir=libgeda/scheme \ libtool --mode=execute gdb --args libgeda/shell/geda-shell -q \ -L libgeda/scheme \ -c '(use-modules (unit-test)) (load (cadr (command-line)))' \ libgeda/scheme/unit-tests/t0015-object-complex.scm We can observe the segfault: Program received signal SIGSEGV, Segmentation fault. scm_cell (e1=0x404) at ../libguile/inline.h:127 127 *freelist = SCM_FREE_CELL_CDR (*freelist); Unfortunately, I've been unable to interpret the backtrace (attached). Can anyone help me out with this? Valgrind / Memcheck wasn't very helpful either. Is there a way to make Guile zero each new heap page it requests before using it in order to reduce the number of false positives the gc generates in Memcheck? In fact, *none* of the ways I've found of running the test without the segfault occurring have given me *any* clue as to how to fix it "properly". I'd really appreciate any suggestions that anyone might be able to give me on figuring out how I've managed to break things. At the moment, I'm at a complete loss. Thanks in advance for any help you can give! Regards, Peter [1] http://www.gpleda.org [2] http://repo.or.cz/w/geda-gaf/peter-b.git/commit/f8b371c8732f [3] http://repo.or.cz/w/geda-gaf/peter-b.git/commit/c7d44a2507ed -- Peter Brett Remote Sensing Research Group Surrey Space Centre