public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Simon.Richter at hogyros dot de" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug malloc/25533] dlopen with RTLD_DEEPBIND crashes when using custom memory manager
Date: Mon, 05 Jul 2021 14:50:45 +0000	[thread overview]
Message-ID: <bug-25533-131-vfe40IV06M@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-25533-131@http.sourceware.org/bugzilla/>

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

--- Comment #7 from Simon Richter <Simon.Richter at hogyros dot de> ---
> This will only push the problem one layer further, in the sense that the caller of strdup would have to be duplicated as well.

In my case, the caller of the strdup is the object that was loaded with
RTLD_DEEPBIND, so that would be kind of what I'd expect here: if another copy
of libudev already exists in the process and is reused without making sure that
its internal references aren't overridden in the instance that is returned,
then the RTLD_DEEPBIND would be silently ignored.

Rereading the documentation of RTLD_DEEPBIND, I'm even slightly confused why
applying RTLD_DEEPBIND to an object will also pull the symbols of its
dependencies to the front (so glibc's "realloc" wins over libtbbmalloc's, as
libudev is only linked against glibc). I would have expected libudev's symbols
to take precedence for internal resolution, and then the same order as in the
rest of the program for the other symbols.

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

  parent reply	other threads:[~2021-07-05 14:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-25533-131@http.sourceware.org/bugzilla/>
2021-07-05 14:04 ` Simon.Richter at hogyros dot de
2021-07-05 14:10 ` fweimer at redhat dot com
2021-07-05 14:50 ` Simon.Richter at hogyros dot de [this message]
2023-02-28 19:52 ` parky at outlook dot com
2023-03-06 15:52 ` 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-25533-131-vfe40IV06M@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).