From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6E21E3858CD1; Thu, 16 Nov 2023 19:19:36 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6E21E3858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1700162376; bh=7qhmr4Btm7CPM9HCSeOoKUg+gRBJdfteGl47Q0M3G0U=; h=From:To:Subject:Date:In-Reply-To:References:From; b=L2k1Sj8e7b1kdMdRG8SGvztBA42ku5MiFXRmdSJRMnZ+Ig2prHB5HWn7XC1+loZKV VvikyvTKqOgHdtpk9IFBuzEhJmk7Hbnm6Xmhk+GyesUMFx1z1e5aaUOmGwG5TWu2fV zT2+4jjRCH4d0I8hCvd+uwhNB9M+9o3uwtrr5nR0= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/30981] dlclose does not properly implement force-first handling Date: Thu, 16 Nov 2023 19:19:35 +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: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: fweimer at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: fweimer at redhat dot com X-Bugzilla-Target-Milestone: 2.39 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: resolution target_milestone bug_status assigned_to 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=3D30981 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Target Milestone|--- |2.39 Status|NEW |RESOLVED Assignee|unassigned at sourceware dot org |fweimer at redhat d= ot com --- Comment #1 from Florian Weimer --- Fixed for 2.39 via: commit 849274d48fc59bfa6db3c713c8ced8026b20f3b7 Author: Florian Weimer Date: Thu Nov 16 19:55:35 2023 +0100 elf: Fix force_first handling in dlclose (bug 30981) The force_first parameter was ineffective because the dlclose'd object was not necessarily the first in the maps array. Also enable force_first handling unconditionally, regardless of namespace. The initial object in a namespace should be destructed first, too. The _dl_sort_maps_dfs function had early returns for relocation dependency processing which broke force_first handling, too, and this is fixed in this change as well. Reviewed-by: Adhemerval Zanella --=20 You are receiving this mail because: You are on the CC list for the bug.=