This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Solaris 2.6 EH failures
- To: Jim Wilson <wilson at cygnus dot com>
- Subject: Re: Solaris 2.6 EH failures
- From: Teemu Torma <tot at trema dot com>
- Date: 11 Mar 1998 10:05:44 +0100
- Cc: egcs at cygnus dot com
Jim Wilson <wilson@cygnus.com> writes:
> The problem is a bad interaction with the thread support. Solaris 2.6
> has POSIX thread support, so configure chooses to use that one. If you
> then run a testcase that uses EH, we end up in an infinite loop in
> eh_context_initialize, because pthread_once returns zero but does not do
> anything. If you compile that testcase with -lpthread, then it works fine.
>
> It seems that if you don't use -lpthread, then the pthread function calls
> are mapped to a helper function named _return_zero that does nothing but
> return zero. This is perhaps a feature of the Solaris shared library support.
> Maybe if you call a function that doesn't exist it gives you _return_zero?
Solaris libc seems to have all pthread functions defined; it does not
seem to be a general feature.
> This seems to work though perhaps there are better solutions. I haven't
> looked at the thread support in any detail as yet.
>
> Fri Mar 6 18:00:18 1998 Jim Wilson <wilson@cygnus.com>
>
> * libgcc2.c (eh_context_initialize): Check get_eh_context instead of
> return value to see if __gthread_once worked.
I posted a similiar fix in http://www.cygnus.com/ml/egcs/1998-Jan/0123.html.
It fixes also some inconsistent return values and checking of them.
Teemu