From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 4B3B23858C74; Mon, 29 May 2023 00:47:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4B3B23858C74 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1685321230; bh=Q/MSzs6s6oZe7b5JTbX3G9dlFl5OI5Y8Ga5IHKWgBOM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Xl2IHsXHxoMOapnMBKONJFLVcJrds5D7dz+5wtieWn3PofSDbkpeotCORbPy7Ff2K OKaaTq48BaBRmvM+YIvJFzh68DECnOA3+POl7CWo2l9rr02FXBRBJWyhvi8PJYsORB uXKcpi05rkmRL50KciTd/swFE54yCcFfe5JrnvRY= From: "amy at amyspark dot me" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/110016] Possible miscodegen when inlining std::condition_variable::wait predicate causes deadlock Date: Mon, 29 May 2023 00:47:09 +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: 12.2.1 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: amy at amyspark dot me 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=3D110016 --- Comment #2 from Amyspark --- We've seen failures both in Windows (all ABI flavors) and macOS only when compiled with GCC -- AppleClang, Clang, and MSVC (in its three flavors) all work without issue. So I'm doubtful it's a logical issue, especially given = that preventing the compiler from inlining void Predicate::operator() into std::condition_variable::wait seems to be enough to work around it. Re 98033-- looks somewhat like it, though as explained earlier, it may also affect non Linux platforms ie. any target where GCC relies on (win)pthreads= .=