From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D53053858C2F; Fri, 27 Jan 2023 15:20:19 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D53053858C2F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674832819; bh=LEI+uh2bp1skRyRnXUi4cUTCX2CpWTrhLMQNiF4hdTk=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Zq8jzQacO1r5dDh7chDS3lWPqt7SCg26Cx8W2oAY/KCs3Glp0DAQ6vw3RseC/L2t/ IatxAeTy0vFL0BJT+tPvhRUUA1v1iRW9EPnp2E0yBLJe4EWCigKZV1wpwa79h7VUxU IX8zK55VtuaJgKyswrpA4d63rou3T72+difkpMqs= From: "jakub 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:20:19 +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: jakub 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 #29 from Jakub Jelinek --- (In reply to Jakub Jelinek from comment #27) > 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). Though, e.g. volatile would then prevent say on x86 using inc directly on t= he memory location, which is used in the -fprofile-update=3Datomic mode (with additio= nal lock).=