From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id D31573858C52; Thu, 2 Feb 2023 21:51:31 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D31573858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1675374691; bh=5lE44nky2ewEm5UqcrnIIp4u7yIIDdz02Cw+oVmWqsE=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Uz6fQ2Qy0aKI0LxKazFF3mvjJnV6/7RimhvDpL61NovXNRap9qCdiwlHyNo91+ngj e6m39K1klVTVIvKbFiOtlkqty3cPnrIrybtKJDZdJWm6IidExY31Yt0n/7Yf1iAtCc l3nX9QYcLbHHjqo4u3kefIcnDAqiQDJpImAD006Y= From: "shaohua.li at inf dot ethz.ch" To: gcc-bugs@gcc.gnu.org Subject: [Bug sanitizer/108637] ASAN at -O2 misses a stack-use-after-scope Date: Thu, 02 Feb 2023 21:51:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: sanitizer X-Bugzilla-Version: 13.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: shaohua.li at inf dot ethz.ch X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: INVALID 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=3D108637 --- Comment #2 from Li Shaohua --- (In reply to Andrew Pinski from comment #1) > PRE removes the load/stores from/to *f . > Basically the compiler is able to remove the use-after-scope usage with -= O2 > and above. Well, this makes sense to me while in this case only -O2 not other opt leve= ls did not report this use-after-scope usage.=