Re[2]: [Gc] Problems with exceptions in OSX

Ivan Maidanski ivmai at mail.ru
Wed Sep 9 13:39:23 PDT 2009


Hi!

"Boehm, Hans" <hans.boehm at hp.com> wrote:
> Ivan just reminded me of this patch, also his diff104_cvs.
> 
> I was trying to understand it and the original code, and failed at both.  Since I'm not a MacOS programmer, I'm probably missing something basic.
> 
> Could someone explain the role of thread_state here, in either version of the code?  As far as I can tell, it gets set to NULL, and is then passed to thread_get_state, which presumably is intended to somehow set it, so that it can then be used by thread_set_state or the like.  Since I think this is compiled as C code, and there are thus no reference parameters, it's unclear to me how thread_get_state can possibly have any impact on a null pointer value.  Can someone enlighten me?
> 
> I realize that this is largely orthogonal to the patch ...
> 
> Thanks.
> 
> Hans 

I think it's a typo - "thread_state_t" should be, in fact, changed to "thread_state_data_t" (which is an array type so always passed by reference in C), and it shouldn't be initialized to null.

For more, eg., see (as a reference) the following code: http://adrishost.net/~adri2000/ubuntu/MoM/result/unpacked/b/basilisk2/0.9.20070407-2/src/Unix/sigsegv.cpp

Bye.


More information about the Gc mailing list