[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

Hello,

I'm working on project where I try to embed ECL (Common Lisp
implementation
based on GC, see http://ecls.sourceforge.net) into a MEX file in Matlab.
I've done it under Windows and everything runs fine. Now I try to port
it
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
segfaults
with the following backtrace:

#0  0x004a6c77 in memset () from /lib/tls/libc.so.6
#1  0xbfff8990 in ?? ()
#2  0x02de7869 in GC_init_headers () at
/imec/other/miracad/src/ecl-cvs/src/gc/headers.c:142
#3  0x02decad5 in GC_init_inner () at
/imec/other/miracad/src/ecl-cvs/src/gc/misc.c:724
#4  0x02dec7d7 in GC_init () at
/imec/other/miracad/src/ecl-cvs/src/gc/misc.c:497
#5  0x02dc01bf in init_alloc () at
/imec/other/miracad/src/ecl-cvs/src/c/alloc_2.d:171
#6  0x02ce56bd in cl_boot (argc=1, argv=0xbfff8100) at
/imec/other/miracad/src/ecl-cvs/src/c/main.d:189
#7  0x00a03a2d in mexFunction (nlhs=0, plhs=0xbfff8990, nrhs=1,
prhs=0xbfff89f0) at test.cpp:36
#8  0x00a7009d in mexRunMexFile () from
/imec/software/matlab/7.3/bin/glnx86/libmex.so
[snip]

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

Michael.



More information about the Gc mailing list