From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 572B638582BA; Sun, 9 Oct 2022 13:51:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 572B638582BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665323481; bh=tc4WfPAAWyKG8EYNSfXLFKzNMhNnmfS7wGskPmbm8zI=; h=From:To:Subject:Date:In-Reply-To:References:From; b=VHALGpowjwnQotvXt2Tl/eMa0g9iElNemLgnn4B8GgVlQTsQEDvdKRzXxbp1TQsNm mRfNZGQM2fzgWkYv8igZ+pCQbRwXUgd30pSKEEqj2JYbDFHukgvBDpFtL/6Pk4pjFz EMZqj3hzBxcFTL1Vo14Rsd8MBcrlpMlMaLpxyu4o= From: "phosit at autistici dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/106665] Cannot pass barrier by reference Date: Sun, 09 Oct 2022 13:51:19 +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.1.1 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: phosit at autistici dot 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: cc 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=3D106665 Phosit changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |phosit at autistici dot org --- Comment #2 from Phosit --- There is a race condition the threads in pool might access sync_point after sync_point is destroyed. If you swap the declarations the the threads in the pool are joined bevore sync_point is destroyed=