This is the mail archive of the gcc-bugs@gcc.gnu.org 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]
Other format: [Raw text]

[Bug boehm-gc/34544] pthread_default_stacksize_np failed.



------- Comment #17 from dave at hiauly1 dot hia dot nrc dot ca  2010-08-13 13:18 -------
Subject: Re:  pthread_default_stacksize_np failed.

> dave at hiauly1 dot hia dot nrc dot ca wrote:
> > I think the answer is to provide a stub for pthread_default_stacksize_np
> > which is linked in last in final executables.  I believe the function is
> > always present in the pthread libraries, both shared and archive.  We
> > already do similar things for a number of functions on hppa64-hpux11.
> 
>  Hmm, certainly worth an attempt. We were caught by subtle bugs with
>  similar attempts on other platforms in the past, like "stub added to
>  lib X, and corner case situation Bla leads to a link order that gets
>  us the stub instead of the real implementation in multi threaded apps".

Same here.  libtool isn't perfect and it links libc into shared
libraries against the recommendation of HP.  So, in applications
with many libraries, it is not clear whether the dynamic loader
will bind the real pthread functions or the stubs.  The search rules
are different for 32 and 64-bit hpux.

The stub for pthread_default_stacksize_np would be in a archive library.
The link option would essentially be the last item in the link command
generated by the gcc driver.  The stub will only be linked in if the
symbol isn't resolved by one of the preceeding libraries.  So, the above
issue can't happen.

>  That's probably settled by now :)

Well no ...

>  We're discussing the options internally. Thanks much for your
>  feedback.

Because of these issues, I have decided to revert the change on the
branches (probably tomorrow).  I will also try to add the stub on
the trunk.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34544


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