[Gc] sun solaris and C++ bug

Sean Middleditch smiddle at twp.ypsilanti.mi.us
Mon Jan 23 08:10:36 PST 2006

On Fri, 2006-01-20 at 22:56 +0000, "Boehm, Hans"  wrote:
> Thanks.
> This is partially, but not completely, fixed in my version.  I expect
> the best workaround is to remove the entire
> #if defined(sparc) ...
> block including the offending code from gc.h.  The comment states that
> this works around a Solaris 2.4 bug, which probably just isn't that
> interesting anymore.  Let me know whether you run into any problems with
> that approach.

I just removed the call to GC_INIT for sparc/solaris in my application.
Unfortunately, the program now crashes with SIGBUS errors, which doesn't
happen on any other OS/architecture combination I've tried.  (Linux/x86,
Linux/POWER, Solaris/x86.  Going to test Linux/sparc and Linux/x86-64
later today.)  I'm not positive yet that it's not my code, but it does
seem like a GC issue.

Is there any kind of comprehensive test utility to run with the GC to
ensure it works correctly on a given platform/architecture?  I tried
'make' test in the gc6.6 distribution, but got the following errors
(again, Solaris 9 on sparc):
bash-2.05$ make test
\"Hans.Boehm at hp.com\" -DGC_VERSION_MAJOR=6 -DGC_VERSION_MINOR=6
-I. -I./include   -fexceptions -g -O2 -c ./tests/test.c
gcc   test.o   -o test
Undefined                       first referenced
 symbol                             in file
GC_calloc_explicitly_typed          test.o
GC_free                             test.o
GC_arrays                           test.o
GC_pthread_create                   test.o
GC_malloc_explicitly_typed          test.o
GC_is_visible                       test.o
GC_malloc_stubborn                  test.o
GC_is_valid_displacement_print_proc test.o
GC_register_displacement            test.o
GC_collect_a_little                 test.o
GC_allocate_ml                      test.o
GC_set_warn_proc                    test.o
GC_register_finalizer               test.o
GC_get_heap_size                    test.o
GC_init_gcj_malloc                  test.o
GC_least_plausible_heap_addr        test.o
GC_malloc_uncollectable             test.o
GC_realloc                          test.o
GC_general_register_disappearing_link test.o
GC_same_obj                         test.o
GC_pthread_join                     test.o
GC_greatest_plausible_heap_addr     test.o
GC_end_stubborn_change              test.o
GC_make_descriptor                  test.o
GC_invoke_finalizers                test.o
GC_is_valid_displacement            test.o
GC_mark_and_push                    test.o
GC_base                             test.o
GC_gcj_malloc                       test.o
GC_noop                             test.o
GC_malloc                           test.o
GC_size                             test.o
GC_gc_no                            test.o
GC_printf                           test.o
GC_debug_header_size                test.o
GC_memalign                         test.o
GC_unregister_disappearing_link     test.o
GC_gcollect                         test.o
GC_abort                            test.o
GC_gcj_fast_malloc                  test.o
GC_malloc_many                      test.o
GC_is_visible_print_proc            test.o
ld: fatal: Symbol referencing errors. No output written to test
collect2: ld returned 1 exit status
make: *** [test] Error 1

(As before, CC me on replies.)
Sean Middleditch <smiddle at twp.ypsilanti.mi.us>
Charter Township of Ypsilanti

More information about the Gc mailing list