This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/10652] getaddrinfo causes segfault if multithreaded and linked statically


------- Additional Comments From redbugs at galexander dot org  2009-11-19 15:18 -------
I have not bothered to actually trace this but I have a likely suspect.
As I understand it, resolution is handled by libnss_*.so, which are still
dynamically linked even if the executable is statically linked.  They
presumably feature weak extern references to various pthread functions.
If pthreoads is dynamically linked, these references succeed.  If
pthreads is statically linked then the pthread symbols are not reexported
to things loaded with dlopen() like the libnss libraries.

I don't know a good solution but perhaps -rdynamic has some role to play?

Or perhaps a less bloated libc than glibc could be used, one which has a
number of simple resolvers built in?  The libnss resolvers on my Linux
system take up 275kB which is enough space for many other unixes to
implement an entire libc....

-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=10652

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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