This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Solaris 2.6 EH failures

Jim Wilson <> 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  <>
> 	* 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
It fixes also some inconsistent return values and checking of them.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]