From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B5A4E385C6D7; Thu, 14 Dec 2023 07:58:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5A4E385C6D7 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1702540726; bh=Tsao+aUQ3hyycT2PEmeJRhOazFnAmUb0AxWMJLhd+Nc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=uiI0fG0wX+1Ep0m/yI150fG8h5DaiThQsTCRCpM/vdXJjJi6A1kWnGekXdaVMXkPy q9iQAYUB+ZTMMd96/cqs+evCBbx2z00HieqztYfEUEYBe9BLNabH5bE7P26zWvLiCr vOot7KB+KdpI1kCxnN5i7w8PaK8oyDLJD5AYYVuQ= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/31164] dlmopen()'ing a shared library that dlopen()'s a non-existent library during initialization returns prematurely Date: Thu, 14 Dec 2023 07:58:46 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.26 X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31164 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fweimer at redhat dot com --- Comment #2 from Florian Weimer --- I believe this was fixed in glibc 2.34 via this commit: commit b2964eb1d9a6b8ab1250e8a881cf406182da5875 Author: Florian Weimer Date: Wed Apr 21 19:49:51 2021 +0200 dlfcn: Failures after dlmopen should not terminate process [BZ #24772] Commit 9e78f6f6e7134a5f299cc8de77370218f8019237 ("Implement _dl_catch_error, _dl_signal_error in libc.so [BZ #16628]") has the side effect that distinct namespaces, as created by dlmopen, now have separate implementations of the rtld exception mechanism. This means that the call to _dl_catch_error from libdl in a secondary namespace does not actually install an exception handler because the thread-local variable catch_hook in the libc.so copy in the secondary namespace is distinct from that of the base namepace. As a result, a dlsym/dlopen/... failure in a secondary namespace terminates the process with a dynamic linker error because it looks to the exception handler mechanism as if no handler has been installed. This commit restores GLRO (dl_catch_error) and uses it to set the handler in the base namespace. Reviewed-by: Adhemerval Zanella (There have been other fixes for ld.so exception handling and dlmopen, and = more generally dlmopen.) --=20 You are receiving this mail because: You are on the CC list for the bug.=