public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redbugs at galexander dot org" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sources.redhat.com
Subject: [Bug libc/10652] getaddrinfo causes segfault if multithreaded and linked statically
Date: Thu, 19 Nov 2009 15:18:00 -0000	[thread overview]
Message-ID: <20091119151813.27345.qmail@sourceware.org> (raw)
In-Reply-To: <20090917113439.10652.heuler@infosim.net>


------- 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.


  parent reply	other threads:[~2009-11-19 15:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-17 11:34 [Bug libc/10652] New: " heuler at infosim dot net
2009-09-17 12:13 ` [Bug libc/10652] " heuler at infosim dot net
2009-09-17 12:31 ` heuler at infosim dot net
2009-09-17 12:44 ` heuler at infosim dot net
2009-09-17 12:47 ` jakub at redhat dot com
2009-09-17 13:30 ` heuler at infosim dot net
2009-09-17 13:39 ` jakub at redhat dot com
2009-09-17 13:47 ` heuler at infosim dot net
2009-10-30  3:08 ` drepper at redhat dot com
2009-10-30 14:53 ` heuler at infosim dot net
2009-11-19 15:18 ` redbugs at galexander dot org [this message]
2010-03-17 11:49 ` vital dot pisaryk at gmail dot com
     [not found] <bug-10652-131@http.sourceware.org/bugzilla/>
2011-03-26  7:10 ` bobby at sharedrealm dot com
2011-03-26  7:15 ` bobby at sharedrealm dot com
2011-03-26  7:24 ` bobby at sharedrealm dot com
2011-03-26  7:36 ` bobby at sharedrealm dot com
2011-03-26  7:58 ` bobby at sharedrealm dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20091119151813.27345.qmail@sourceware.org \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).