From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 11082385E02E; Tue, 24 May 2022 11:15:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11082385E02E From: "wilco at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libgcc/105708] libgcc: aarch64: init_lse_atomics can race with user-defined constructors Date: Tue, 24 May 2022 11:15:35 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libgcc X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: wilco at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: WONTFIX X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 May 2022 11:15:36 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D105708 --- Comment #12 from Wilco --- (In reply to Jakub Jelinek from comment #11) > How can changing the constructor priority in libgcc affect anything? > Constructor priorities are within the same shared library or within the s= ame > executable, not inside of the same process. So, e.g. when using > libgcc_s.so.1, > it might change order with other constructors inside of that shared libra= ry > (there are likely none), but nothing else. For libgcc.a, it might affect > even ctors of the other objects with which the library is linked, but sti= ll > not between different shared libraries or binaries. The outline atomics are linked with each .so (to avoid the PLT and GOT), so there are multiple copies and any initialization order issues are within the .so.=