From: "Joseph S. Myers" <joseph@codesourcery.com>
To: "Maciej W. Rozycki" <macro@codesourcery.com>
Cc: <libc-alpha@sourceware.org>, <libc-ports@sourceware.org>
Subject: Re: [PATCH] Correct global-scope dlopen issues in static executables
Date: Wed, 16 Jan 2013 20:30:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1301162024510.3212@digraph.polyomino.org.uk> (raw)
In-Reply-To: <alpine.DEB.1.10.1301152056590.4834@tp.orcam.me.uk>
On Wed, 16 Jan 2013, Maciej W. Rozycki wrote:
> We have two issues with dlopen issued from static executables when the
> global scope is accessed.
>
> First, an attempt to add a dynamic shared module to the global scope
> (i.e. with RTLD_GLOBAL requested) crashes like this:
>
> Program received signal SIGSEGV, Segmentation fault.
> add_to_global (new=0x49ef60) at dl-open.c:101
> 101 ns->_ns_global_scope_alloc
>
> This is because at this point in static executables no global search list
> data structure has been initialised and as result the _ns_main_searchlist
> member of _dl_ns[LM_ID_BASE] (the initial namespace) is null.
>
> Second, an attempt to access the global scope itself (i.e. by using a
> null file name pointer) fails with an obscure error like:
Could you file a bug (or two bugs) for these issues in glibc Bugzilla
(component dynamic-link), if there isn't already one there? We like to
have a bug in Bugzilla for any patch submission that fixes a user-visible
bug that was present in a glibc release, so that the issue remains visible
if the patch takes a while to review and so that people can search
resolved bugs in Bugzilla to see if a bug they have found in a past
release is known and fixed. See item 1 at
<http://sourceware.org/glibc/wiki/Contribution%20checklist>. (The fixed
bugs are then listed using [BZ #N] notation in the ChangeLog entries for
the patch that fixes them, and added to the list of fixed bugs in NEWS
when committing the patch.)
I hope someone more familiar with the details of the dynamic linker will
review the substance of this patch.
--
Joseph S. Myers
joseph@codesourcery.com
next prev parent reply other threads:[~2013-01-16 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-16 18:13 Maciej W. Rozycki
2013-01-16 20:30 ` Joseph S. Myers [this message]
2013-01-16 22:50 ` [PATCH][BZ #15022] " Maciej W. Rozycki
[not found] ` <20130116215545.7A37A2C0B0@topped-with-meat.com>
[not found] ` <alpine.DEB.1.10.1301240655220.4834@tp.orcam.me.uk>
[not found] ` <20130531200059.C94C02C077@topped-with-meat.com>
[not found] ` <alpine.DEB.1.10.1306140202520.16287@tp.orcam.me.uk>
[not found] ` <20130619233103.A913F2C0A6@topped-with-meat.com>
[not found] ` <CAMe9rOpR6OGW6CfrG5NN2HPM_=tW-1om4Y_dFVXmUk2h5xg6sQ@mail.gmail.com>
[not found] ` <20130620204740.69A5E2C135@topped-with-meat.com>
[not found] ` <alpine.DEB.1.10.1306211348160.16287@tp.orcam.me.uk>
[not found] ` <20130621181119.DACD52C09F@topped-with-meat.com>
2013-06-27 10:52 ` [PATCH 1/5][v2][BZ #15022] Avoid repeated calls to DL_STATIC_INIT Maciej W. Rozycki
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=Pine.LNX.4.64.1301162024510.3212@digraph.polyomino.org.uk \
--to=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
--cc=libc-ports@sourceware.org \
--cc=macro@codesourcery.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).