public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fweimer at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug dynamic-link/23462] Static binary with dynamic string tokens ($LIB, $PLATFORM, $ORIGIN) crashes
Date: Fri, 12 Mar 2021 15:45:52 +0000	[thread overview]
Message-ID: <bug-23462-131-mS0SjInGHj@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-23462-131@http.sourceware.org/bugzilla/>

https://sourceware.org/bugzilla/show_bug.cgi?id=23462

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED
   Target Milestone|---                         |2.34

--- Comment #6 from Florian Weimer <fweimer at redhat dot com> ---
Fixed for glibc 2.34 via:

commit 332421312576bd7095e70589154af99b124dd2d1
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Fri Mar 12 16:44:47 2021 +0100

    elf: Always set l in _dl_init_paths (bug 23462)

    After d1d5471579eb0426671bf94f2d71e61dfb204c30 ("Remove dead
    DL_DST_REQ_STATIC code.") we always setup the link map l to make the
    static and shared cases the same.  The bug is that in elf/dl-load.c
    (_dl_init_paths) we conditionally set l only in the #ifdef SHARED
    case, but unconditionally use it later.  The simple solution is to
    remove the #ifdef SHARED conditional, because it's no longer needed,
    and unconditionally setup l for both the static and shared cases. A
    regression test is added to run a static binary with
    LD_LIBRARY_PATH='$ORIGIN' which crashes before the fix and runs after
    the fix.

    Co-Authored-By: Florian Weimer <fweimer@redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

  parent reply	other threads:[~2021-03-12 15:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-23462-131@http.sourceware.org/bugzilla/>
2020-09-18 10:42 ` [Bug dynamic-link/23462] Static binary with dynamic string tokens crashes christoph.hoeger at celeraone dot com
2021-03-03  3:34 ` fweimer at redhat dot com
2021-03-03  3:34 ` [Bug dynamic-link/23462] Static binary with dynamic string tokens ($LIB, $PLATFORM, $ORIGIN) crashes fweimer at redhat dot com
2021-03-03 14:08 ` carlos at redhat dot com
2021-03-05 15:08 ` fweimer at redhat dot com
2021-03-12 15:45 ` fweimer at redhat dot com [this message]
2021-03-16  9:27 ` fweimer at redhat 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=bug-23462-131-mS0SjInGHj@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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).