public inbox for
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <>
To: "Maciej W. Rozycki" <>
Cc: <>, <>
Subject: Re: [PATCH] Correct global-scope dlopen issues in static executables
Date: Wed, 16 Jan 2013 20:30:00 -0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

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

  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] ` <>
     [not found]   ` <>
     [not found]     ` <>
     [not found]       ` <>
     [not found]         ` <>
     [not found]           ` <>
     [not found]             ` <>
     [not found]               ` <>
     [not found]                 ` <>
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:

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

  git send-email \ \ \ \ \ \

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