From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3C9303851C36; Tue, 28 Apr 2020 13:16:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3C9303851C36 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1588079804; bh=VPFfIImefJvPLCD0+2XDL0TOtG62h/HfdrTWliV5FLU=; h=From:To:Subject:Date:In-Reply-To:References:From; b=rs0y+vfUhLh2O3azvmsXDOmQnz4jLJwUkxQqU/tBhyC/8ij4lx0his1XeZ7zDKt6f zDMn5eW+VNTec0JQPa80GAPbKSFZ0bkC6KLrNK7Y6h08cEEvLoKWnvdIOU6Vq3LKkg W9QArYgV7QUESg+CtPBCy/EfeJyrggdIdpZG+e0w= From: "gcasper42 at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/94810] std::cout segmentation fault in __attribute__((constructor)) function Date: Tue, 28 Apr 2020 13:16:44 +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: gcasper42 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 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 13:16:44 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94810 --- Comment #4 from Geoffrey Casper --- Wouldn't it make more sense to initialize global objects on a per need basi= s? So the constructors of unused global objects would never be called and ther= e is no ambiguity of when constructors are called. I'd gladly work on implementi= ng this, but I'd need some more information on the brod design of GCC.=