[Gc] GC_local_malloc sigsegv

jim marshall jim.marshall at wbemsolutions.com
Sat Jun 30 22:31:47 PDT 2007


Yup me again, sorry :(

I was playing with gc 6.8 and some of the threading options to 
configure. I am getting a sigsegv:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1074153152 (LWP 15028)]
GC_local_malloc (bytes=4) at ./include/private/specific.h:87
87          tse * entry = *entry_ptr;   /* Must be loaded only once.    */
(gdb) bt
#0  GC_local_malloc (bytes=4) at ./include/private/specific.h:87
#1  0x08048638 in main () at gctest4.c:20

where gctest4.c is the loop example from 
http://www.hpl.hp.com/personal/Hans_Boehm/gc/simple_example.html with the

#include <gc.h>

line removed and changed to be

#define GC_THREADS
#ifdef _DEBUG
  #define GC_DEBUG
#endif /* _DEBUG */

#define USE_MUNMAP /* tried commenting this out as well */
#define GC_REDIRECT_TO_LOCAL /* commenting this out causes app to work - 
no surprise */
#include "68rel/include/gc_local_alloc.h"

compiled as such (tried with gcc 4.1.0 and 3.2.2)
cc -g gctest4.c -o gctest4 -Wl,-rpath=/home/jmars/gctests/68rel/lib 
-L/home/jmars/gctests/68rel/lib -l gc


This is GC 6.8 on Linux with the following configure (built with gcc 3.2.2):
./configure --prefix=/home/jmars/68rel --exec-prefix=/home/jmars/68rel 
--enable-gc-assertions --enable-static=no --enable-threads=posix 
--enable-thread-local-alloc

Any thoughts on why this fails?

Thanks again :-[
-Jim



More information about the Gc mailing list