From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E4D5E3858CDB; Sat, 30 Dec 2023 20:25:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E4D5E3858CDB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1703967906; bh=BXP7GSAyWvbSTBHjvDJGiXQoa5/XZiC7ownIXbqnQUc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=DO/0ogQV1u7JfLQKFxQUUlfOh7cWCItM2XWsRt+d4aUobEigaMCaqEBqCkWxTSiiD FojVWEMLOWVOmJeChKXr1rrGNvy3M00XB/fn6vfvpVXuBEMoRhWOODX3975ehx0luz DCiRJYnbI15OtUgkYqQfb7ulniZnPGK1Ikkyx4cU= From: "sebunger44 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug lto/113183] LTO crashes with Segmentation fault Date: Sat, 30 Dec 2023 20:25:06 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: lto X-Bugzilla-Version: 13.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: sebunger44 at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: 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 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D113183 --- Comment #13 from Sebastian Unger --- No worries, the constructor attribute is much better. I was aware of that, = but at the time had already several examples using .preinit_array and couldn't = be bothered to look it up. I later added the sort by priority and added priori= ties to the *init_array symbols that needed them, but not this one. Interesting= ly, that was not when LTO started crashing (or I might have made the connection= ). LTO only started crashing once I added the static global object NonTrivial! Weird. In any case, I have changed to the constructor attribute and learned my les= son and am all good. I'll leave this issue open in case someone wants to fix the crash in LD (or wherever it comes from) so people running into this in the future will get a nicer error message.=