From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 7F349385BF81; Tue, 28 Apr 2020 08:51:33 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F349385BF81 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588063893; bh=Ej/uba8+0XIvRjpECl7sjH0g/KqP8K8myT/XgUVXRtc=; h=From:To:Subject:Date:In-Reply-To:References:From; b=G+OT+5RVkAIuW4HPsfXeqtdIadiA1VwxEr25gNds+ssap5HP9UG6O4s7rSDOFeWcO uhn3y+Ht9eAsqvD51obtNXWAVxa/dOggohtK0okp7pHBaX1GVLEmemh0HBdLAE0aWs g0lDIENUomEbEGG8LvXZ1Sp8lEf7iq+dMBMHwdd0= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94810] std::cout segmentation fault in __attribute__((constructor)) function Date: Tue, 28 Apr 2020 08:51:33 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org 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 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, 28 Apr 2020 08:51:33 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94810 --- Comment #3 from Jonathan Wakely --- There isn't, there's a segfault in your program. That is caused by assuming that the global streams have been constructed already, when it is clearly documented that the construction order is unspecified.=