public inbox for glibc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hjl.tools at gmail dot com" <sourceware-bugzilla@sourceware.org> To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/27609] [2.32/2.33/2.34 Regression] In elf/dl-open.c (_dl_open) we might use __LM_ID_CALLER to index GL(dl_ns)[] Date: Thu, 30 Sep 2021 17:19:44 +0000 [thread overview] Message-ID: <bug-27609-131-psgv121liK@http.sourceware.org/bugzilla/> (raw) In-Reply-To: <bug-27609-131@http.sourceware.org/bugzilla/> https://sourceware.org/bugzilla/show_bug.cgi?id=27609 H.J. Lu <hjl.tools at gmail dot com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|In elf/dl-open.c (_dl_open) |[2.32/2.33/2.34 Regression] |we might use __LM_ID_CALLER |In elf/dl-open.c (_dl_open) |to index GL(dl_ns)[] |we might use __LM_ID_CALLER | |to index GL(dl_ns)[] Version|2.33 |2.32 CC| |fweimer at redhat dot com --- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> --- commit ec935dea6332cb22f9881cd1162bad156173f4b0 Author: Florian Weimer <fweimer@redhat.com> Date: Fri Apr 24 22:31:15 2020 +0200 elf: Implement __libc_early_init has @@ -856,6 +876,11 @@ no more namespaces available for dlmopen()")); /* See if an error occurred during loading. */ if (__glibc_unlikely (exception.errstring != NULL)) { + /* Avoid keeping around a dangling reference to the libc.so link + map in case it has been cached in libc_map. */ + if (!args.libc_already_loaded) + GL(dl_ns)[nsid].libc_map = NULL; + do_dlopen calls _dl_open with nsid == __LM_ID_CALLER (-2), which calls dl_open_worker with args.nsid = nsid. dl_open_worker updates args.nsid if it is __LM_ID_CALLER. After dl_open_worker returns, it is wrong to use nsid. -- You are receiving this mail because: You are on the CC list for the bug.
next prev parent reply other threads:[~2021-09-30 17:19 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-18 18:55 [Bug dynamic-link/27609] New: " carlos at redhat dot com 2021-08-17 18:31 ` [Bug dynamic-link/27609] " hjl.tools at gmail dot com 2021-09-30 17:19 ` hjl.tools at gmail dot com [this message] 2021-09-30 19:41 ` [Bug dynamic-link/27609] [2.32/2.33/2.34 Regression] " cvs-commit at gcc dot gnu.org 2021-10-13 12:29 ` cvs-commit at gcc dot gnu.org 2021-10-13 12:57 ` cvs-commit at gcc dot gnu.org 2021-10-13 14:10 ` cvs-commit at gcc dot gnu.org 2021-10-13 14:11 ` hjl.tools at gmail 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-27609-131-psgv121liK@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: linkBe 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).