[Gc] Bus error with the CVS version on Leopard x86

Joel Reymont joelr1 at gmail.com
Sat Dec 22 19:55:22 PST 2007


#include <gc.h>
#include <stdio.h>
extern GC_do_blocking();

main( int argc, char *argv[] ) {
   GC_init();
   if( GC_do_blocking() ) puts( "yes" ); else puts( "yes" );
   return 0;
}

gcc -g /tmp/actestbigloo.c -o /tmp/Xactestbigloo -I/usr/local/include/gc 
-I/usr/local/include/gc/gc 
-L/usr/local/lib -lgc

(gdb) r
Starting program: /private/tmp/Xactestbigloo 
Reading symbols for shared libraries +++. done

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_PROTECTION_FAILURE at address: 0x00000000
0x00000000 in ?? ()
(gdb) where
#0  0x00000000 in ?? ()
#1  0x00049f5d in GC_do_blocking_inner (data=0xbffff278 "", context=0x0) 
at pthread_support.c:888
#2  0x0004b05d in GC_with_callee_saves_pushed
 (fn=0x49f10 <GC_do_blocking_inner>, arg=0x0) at 
mach_dep.c:225
#3  0x0004a00e in GC_do_blocking (fn=0, arg=0x0) 
at pthread_support.c:899
#4  0x00001fcd in main (argc=1, argv=0xbffff2d0) 
at /tmp/actestbigloo.c:7

What am I doing wrong?

    Thanks, Joel






More information about the Gc mailing list