From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 546AB3858283; Tue, 20 Sep 2022 09:07:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 546AB3858283 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663664871; bh=uOa4pMsPeU+5s0hF2ff3/9CZBzMGB8cCgsfhuH2GD6s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=vsxhXfgMuDantjd3lbzjpUnLF9oIEEXY5VfPIpftaVu5d+7RbRY/NcvaNuSVtm2jr dcxdZph2z5zIcoEJxLw8yTvyMpnIWipJBgnrdQuFkns3tRNPqT3DOnZRDP/ZlI9LOP jJ9+XDIvlTJNvUh8JhZUFLNjgBgC4+Q6zIvLVvmE= From: "fweimer at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/28937] New DSO dependency sorter does not put new map first if in a cycle Date: Tue, 20 Sep 2022 09:07:45 +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.35 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.37 X-Bugzilla-Flags: security- X-Bugzilla-Changed-Fields: resolution target_milestone bug_status 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=3D28937 Florian Weimer changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Target Milestone|--- |2.37 Status|ASSIGNED |RESOLVED --- Comment #10 from Florian Weimer --- Fixed for 2.37 via: commit 1df71d32fe5f5905ffd5d100e5e9ca8ad6210891 Author: Florian Weimer Date: Tue Sep 20 11:00:42 2022 +0200 elf: Implement force_first handling in _dl_sort_maps_dfs (bug 28937) The implementation in _dl_close_worker requires that the first element of l_initfini is always this very map (=E2=80=9CWe are always t= he zeroth entry, and since we don't include ourselves in the dependency analysis start at 1.=E2=80=9D). Rather than fixing that assumption, this commit adds an implementation of the force_first argument to the new dependency sorting algorithm. This also means that the directly dlopen'ed shared object is always initialized last, which is the least surprising behavior in the presence of cycles. Reviewed-by: Adhemerval Zanella I'll backport this as applicable. --=20 You are receiving this mail because: You are on the CC list for the bug.=