[Gc] Segmentation fault when embedding GC in Matlab (fwd)

Hans Boehm Hans.Boehm at hp.com
Fri Aug 17 09:58:23 PDT 2007

Forwarding, since it's a bit hard for me to approve it at the
moment ...

---------- Forwarded message ----------
Date: Fri, 17 Aug 2007 15:43:00 +0200
From: Goffioul Michael <goffioul at imec.be>
To: gc at linux.hpl.hp.com
Subject: Segmentation fault when embedding GC in Matlab


I'm working on project where I try to embed ECL (Common Lisp
based on GC, see https://ecls.sourceforge.net) into a MEX file in Matlab.
I've done it under Windows and everything runs fine. Now I try to port
to Linux, but I get a segmentation fault at GC initialization.

First my setup:
AMD Opteron 250, running Linux Redhat 32-bits
Matlab 7.3
gcc-3.4.5 compiled for 32-bits platforms
ECL CVS (compiled for 32 bits, without thread support)
   -> this version uses GC-6.8

When I start Matlab without JVM support, I can load my MEX file without
any problem. If I start it with JVM support, then GC initialization
with the following backtrace:

#0  0x004a6c77 in memset () from /lib/tls/libc.so.6
#1  0xbfff8990 in ?? ()
#2  0x02de7869 in GC_init_headers () at
#3  0x02decad5 in GC_init_inner () at
#4  0x02dec7d7 in GC_init () at
#5  0x02dc01bf in init_alloc () at
#6  0x02ce56bd in cl_boot (argc=1, argv=0xbfff8100) at
#7  0x00a03a2d in mexFunction (nlhs=0, plhs=0xbfff8990, nrhs=1,
prhs=0xbfff89f0) at test.cpp:36
#8  0x00a7009d in mexRunMexFile () from

Would you have any idea about what's going on? Thanks.


More information about the Gc mailing list