From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E26833857352; Fri, 27 Jan 2023 17:05:28 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E26833857352 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674839129; bh=lY2XctTXkqd8coijDo/IHhj36UxqvWpyhH5QuYXRKM0=; h=From:To:Subject:Date:In-Reply-To:References:From; b=jnDP949q/xc2cgSxa2WrYymJhG05WXDzzpJrtQEbsAoC5NcZkqad42ko+/ahcrEWT 7zRJpYH0e0kT1OdnlP09lDFbvldr4WwnC2RAHg9w1gwfkpGSDZWJDC1II/N93qPNJe +GX9m3USmZ6DoJWxD5Y0XM4VXo0be0yVCeHqf+yc= From: "torvalds@linux-foundation.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 17:05:27 +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: torvalds@linux-foundation.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 #31 from Linus Torvalds --- (In reply to Richard Biener from comment #26) >=20 > Now, in principle we should have applied store-motion and not only PRE wh= ich > would have avoided the issue, not tricking the RA into reloading the value > from where we store it in the loop, but the kernel uses -fno-tree-loop-im, > preventing that. If you enable that you'd get Note that we use -fno-tree-loop-im only for the GCOV case, and because of another problem with code generation with gcov. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D69702 and the fix for the excessive stack use was to disable that compiler option. See =20 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?= id=3Dc87bf431448b404a6ef5fbabd74c0e3e42157a7f for the kernel commit message.=