This is the mail archive of the
mailing list for the glibc project.
Re: Question about BZ#10652: Dynamic loading a library that is linked with pthread crashes app compiled without pthread in getaddrinfo
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Andreas Jaeger <aj at suse dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Thu, 11 Oct 2012 16:39:44 -0700 (PDT)
- Subject: Re: Question about BZ#10652: Dynamic loading a library that is linked with pthread crashes app compiled without pthread in getaddrinfo
- References: <2042694.5plpp0UFrk@byrd>
> The same crash happens if the host program is not compiled with "-
> pthread" and dynamically loads a module which is linked to libpthread.so
> and calls getaddrinfo() from multiple threads.
> Is this a valid bug?
I don't think we actually know the answer.
There certainly was some effort made to support dynamically loading
libpthread.so via dlopen (whether directly or via dependencies). See
for example the PT_TLS handling in dl-open.c, where we specifically
test for this case.
But at other times I think some people have said that it wasn't supported.
I'm not sure we have any testing for that scenario, but we might. The
most obvious thing that needs testing of that is various permutations
of TLS use. But there are almost certainly other corners of
functionality (e.g. libc's forwarding wrappers) that should be tested
for that scenario if we're going to allow it.