[Gc] build & gctest failures on darwin/xlc/pthreads

Dan Bonachea bonachea at cs.berkeley.edu
Thu Apr 21 11:50:54 PDT 2005


I get the following build failure on GC 6.4 when using the IBM xlc compiler 
6.0 on darwin/pthreads:

--------------------
$ /opt/ibmcmp/vacpp/6.0/bin/xlc -DLARGE_CONFIG=1 -qnoansialias -DNDEBUG -O5 
-qarch=auto -qtune=auto -qsmp=noauto -qmaxmem=-1 -qipa=level=0 
-DPACKAGE_NAME=\"gc\" -DPACKAGE_TARNAME=\"gc\" -DPACKAGE_VERSION=\"6.4\" 
"-DPACKAGE_STRING=\"gc 6.4\"" -DPACKAGE_BUGREPORT=\"Hans.Boehm at hp.com\" 
-DGC_VERSION_MAJOR=6 -DGC_VERSION_MINOR=4 -DPACKAGE=\"gc\" -DVERSION=\"6.4\" 
-DGC_DARWIN_THREADS=1 -DTHREAD_LOCAL_ALLOC=1 -DSTDC_HEADERS=1 
-DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
-DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 
-DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DSILENT=1 -DNO_SIGNALS=1 
-DNO_EXECUTE_PERMISSION=1 -DALL_INTERIOR_POINTERS=1 -DJAVA_FINALIZATION=1 
-DGC_GCJ_SUPPORT=1 -DATOMIC_UNCOLLECTABLE=1 
-I../../../../src-2.762/runtime/gc-build/pthread/../../gc/include -g -c 
../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c -o os_dep.o
/opt/ibmcmp/vacpp/6.0/bin/xlc: 1501-218 file 6.4" 
-DPACKAGE_BUGREPORT=\Hans.Boehm at hp.com" contains an incorrect file suffix
/opt/ibmcmp/vacpp/6.0/bin/xlc: 1501-228 input file 6.4" 
-DPACKAGE_BUGREPORT=\Hans.Boehm at hp.com" not found
"../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c", line 
3739.44: 1506-280 (W) Function argument assignment between types "unsigned 
int*" and "int*" is not allowed.
"../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c", line 
3750.36: 1506-280 (W) Function argument assignment between types "unsigned 
int*" and "int*" is not allowed.
"../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c", line 
3751.17: 1506-280 (W) Function argument assignment between types "unsigned 
int*" and "int*" is not allowed.
"../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c", line 
3755.36: 1506-280 (W) Function argument assignment between types "unsigned 
int*" and "int*" is not allowed.
"../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c", line 
3756.17: 1506-280 (W) Function argument assignment between types "unsigned 
int*" and "int*" is not allowed.
"../../../../src-2.762/runtime/gc-build/pthread/../../gc/os_dep.c", line 
3765.44: 1506-280 (W) Function argument assignment between types "unsigned 
int*" and "int*" is not allowed.
/mac_bld/r22/082804P/wcode/source/USTR_f.c:147: failed assertion `wsp -> 
global_reg == 0 || wsp -> global_reg == src'
--------------------

If I compile with all optimizations disabled, I'm able to compile, but gctest 
dies with a bus error:

--------------------
Program received signal EXC_BAD_ACCESS, Could not access memory.
0x000286e8 in FindTopOfStack (stack_start=0) at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/darwin_stop_world.c:40
40          if (frame->savedSP == NULL) break;
(gdb) where
#0  0x000286e8 in FindTopOfStack (stack_start=0) at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/darwin_stop_world.c:40
#1  0x00028504 in GC_push_all_stacks () at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/darwin_stop_world.c:76
#2  0x0001e8b4 in GC_default_push_other_roots () at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/os_dep.c:2053
#3  0x00020910 in GC_push_roots (all=1, cold_gc_frame=0xbffff4a4 "") at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/mark_rts.c:643
#4  0x0000fd7c in GC_mark_some (cold_gc_frame=0xbffff4a4 "") at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/mark.c:326
#5  0x0000c418 in GC_stopped_mark (stop_func=0xbda0 <GC_never_stop_func>) at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/alloc.c:519
#6  0x0000bcbc in GC_try_to_collect_inner (stop_func=0xbda0 
<GC_never_stop_func>) at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/alloc.c:366
#7  0x000070c4 in GC_init_inner () at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/misc.c:782
#8  0x00008108 in GC_init () at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/misc.c:492
#9  0x00002a2c in main () at 
../../../../src-2.775/runtime/gc-build/pthread/../../gc/tests/test.c:1794
(gdb)
--------------------

In both cases the non-pthreaded collector compiles perfectly and gctest works.

Dan



More information about the Gc mailing list