[Gc] Re: gc6.4/6.5 issues on Darwin

Andrew Begel abegel at cs.berkeley.edu
Thu May 19 16:16:59 PDT 2005


I get the same compiler warnings and exceptions in gctest on OSX  
10.4.1 (Darwin 8.1.0).

I don't know anything about this particular code (GC_forward_exception 
()) or how it works. Maybe Brian Alliet knows?

You can get the warnings to go away if you change thread_state local  
variable declared at the top of GC_forward_exception() from type  
thread_state_data_t to thread_state_t. This is what shows up in my  
header declaration of thread_get_state() on OSX 10.4.1 (Darwin 8.1.0).

Andy

On May 19, 2005, at 3:53 PM, Boehm, Hans wrote:

> While testing a 6.5 candidate on a Darwin machine, I see the  
> following problems,
> though only if I test the dynamic library version with ./configure;  
> make .
>
> The same problems are reproducible with 6.4, which I used here.
>
> Any advice/patches?
>
> Thanks.
>
> Hans
>
> OS version, though I'm not sure how that maps to the marketing  
> numbers:
>
> [margaux:~/gc6.4] boehm% uname -a
> Darwin margaux.hpl.hp.com 8.1.0 Darwin Kernel Version 8.1.0: Tue  
> May 10 18:16:08 PDT 2005; root:xnu-792.1.5.obj~4/RELEASE_PPC Power  
> Macintosh powerpc
>
> Gcc claims it's an October version of pre-4.0.  (This isn't my  
> machine.)
>
> I get the following somewhat suspicious warnings:
>
> os_dep.c: In function 'GC_forward_exception':
> os_dep.c:3739: warning: pointer targets in passing argument 3 of  
> 'thread_get_state' differ in signedness
> os_dep.c:3751: warning: pointer targets in passing argument 8 of  
> 'exception_raise_state' differ in signedness
> os_dep.c:3751: warning: pointer targets in passing argument 10 of  
> 'exception_raise_state' differ in signedness
> os_dep.c:3756: warning: pointer targets in passing argument 8 of  
> 'exception_raise_state_identity' differ in signedness
> os_dep.c:3756: warning: pointer targets in passing argument 10 of  
> 'exception_raise_state_identity' differ in signedness
> os_dep.c:3765: warning: pointer targets in passing argument 3 of  
> 'thread_set_state' differ in signedness
>
> And then a failure at run-time, also in the Mach dirty-bit code  
> when I try to run gctest:
>
> (gdb) run
> Starting program: /Users/boehm/gc6.4/.libs/gctest
> Reading symbols for shared libraries .+ done
> Switched to incremental mode
> Emulating dirty bits with mprotect/signals
>
> Program received signal EXC_BAD_INSTRUCTION, Illegal instruction/ 
> operand.
> [Switching to process 27092 thread 0x1103]
> 0x0000ef30 in catch_exception_raise ()
> (gdb) where
> #0  0x0000ef30 in catch_exception_raise ()
> #1  0x900a4d10 in _Xexception_raise ()
> #2  0x900a4bf8 in exc_server ()
> #3  0x0007f024 in GC_mprotect_thread (arg=0x0) at os_dep.c:3567
> #4  0x9002c3d4 in _pthread_body ()
> (gdb) up 3
> #3  0x0007f024 in GC_mprotect_thread (arg=0x0) at os_dep.c:3567
> 3567                    if(!exc_server(&msg.head,&reply.head))
> (gdb) p msg
> $1 = {
>   head = {
>     msgh_bits = 2147488018,
>     msgh_size = 76,
>     msgh_remote_port = 9475,
>     msgh_local_port = 527,
>     msgh_reserved = 1153841472,
>     msgh_id = 2401
>   },
>   msgh_body = {
>     msgh_descriptor_count = 2
>   },
>   data = "\000\000\022\003\000\000\000\000\a<\021\000\000\000\016\a 
> \000\000\000\003\000\001\021", '\0' <repeats 12 times>, "\001\000 
> \000\000\002\000\000\000\002\000\016Oï¿¿\000\000\000\000\000\000\000 
> \b", '\0' <repeats 967 times>
> }
> (gdb) p reply
> $2 = {
>   head = {
>     msgh_bits = 18,
>     msgh_size = 36,
>     msgh_remote_port = 9475,
>     msgh_local_port = 0,
>     msgh_reserved = 0,
>     msgh_id = 2501
>   },
>   data = '\0' <repeats 255 times>
> }
> (gdb)
>




More information about the Gc mailing list