From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id F1C3D3858039; Fri, 27 Jan 2023 15:18:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F1C3D3858039 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674832736; bh=TYbRmqDeRUHCByCpDgg5sor/WjuS+6MOVhCa+cz9dYw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aQiLZKjVoranHfSDRUS9wVwRyxzJsACmwY2XojvS1f40n1m8SjlWLSvqJI45T9Fy2 x8oJXcREcZygYy054uj/47st/zx7yXlE5tgKa1zmQW5GcToHPtFK3iOE5gv7ymKj7q zkntq1ukXr6F5hCP/Vtey24VPLRbyd1m6aBpPrds= From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/108552] Linux i386 kernel 5.14 memory corruption for pre_compound_page() when gcov is enabled Date: Fri, 27 Jan 2023 15:18:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: tree-optimization X-Bugzilla-Version: 11.3.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth 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: 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=3D108552 --- Comment #28 from Richard Biener --- (In reply to Jakub Jelinek from comment #27) > (In reply to Richard Biener from comment #25) > > Ah, reading more comments, no - it probably doesn't. Jakub correctly s= ays > > that there seems to be a data race necessary to trigger this, so it doe= sn't > > seem to be a GCC issue? >=20 > Well, we could in -fprofile-update=3Dsingle (or perhaps in a new single-l= ike > mode) mark the gcov artificial vars volatile or with some flag that would= at > least cause reload not to reread values from memory. The profiling would= be > still racy, but at the expense of somewhat slower code (with volatile mor= e, > with special flag less so) slightly less so (as it would e.g. prevent the > compiler from avoiding the rereads). -fprofile-update=3Dvolatile? Huh, sure, we could do that.=