From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 2725C3858D38; Tue, 21 May 2024 13:21:55 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2725C3858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1716297715; bh=F90/IU+0niMdQEoesjV29ECJ/ffUe1TO/qFe5XrfDms=; h=From:To:Subject:Date:In-Reply-To:References:From; b=wYhEMp99sGbR6eHvBFK3xP5jaNkk7w+SR1uCFoPNuxyGoab5mcjaQji6JqqBl+/ep fLFDpHl2ELueb/z+LnqSbXU5lIMahTN639WxBERHk3uj4TZDntoEdexoii4TfPaQk3 yMSy3m1GUH9qSvWY5Sq1MnV1pZZKgKX7XjNnyTSY= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/115173] GCC hang and memory exhaustion issue with complex nested initializer lists in C++ std::string construction Date: Tue, 21 May 2024 13:21:54 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 13.1.0 X-Bugzilla-Keywords: diagnostic, ice-on-invalid-code, memory-hog X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW 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: cf_reconfirmed_on keywords bug_status everconfirmed 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=3D115173 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2024-05-21 Keywords| |diagnostic, | |ice-on-invalid-code, | |memory-hog Status|UNCONFIRMED |NEW Ever confirmed|0 |1 --- Comment #1 from Jonathan Wakely --- I'm marking this as ice-on-invalid-code, even though it gets killed rather = than ICE-ing. But it is invalid. The summary seems misleading, there are no nested initializer lists here. I= t's just syntactically ill-formed code with mismatched braces and parentheses. And most of the functions are irrelevant to the exponential code. Reduced: #include struct string { string(std::initializer_list) { } }; void j() { =20 string(string(string(string(string(string(string(string(string(string(strin= g(string(string(string(string(string(string(string(string(string(string(str= ing(string(string(string(string(string(string(string(string(string(string(s= tring(string(string(string(string(string(string(string(string(string(string= (string(string(string(string(string(string(string(string(>) { } }; } This seems like auto-generated garbage, not something anybody would ever wr= ite by accident, so should be very low priority.=