From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 989D0383D835; Fri, 28 Jan 2022 06:38:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 989D0383D835 From: "law at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/103483] [12 regression] context-sensitive ranges change triggers stringop-overread Date: Fri, 28 Jan 2022 06:38:38 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: diagnostic X-Bugzilla-Severity: normal X-Bugzilla-Who: law 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: 12.0 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 28 Jan 2022 06:38:38 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D103483 Jeffrey A. Law changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |law at gcc dot gnu.org --- Comment #19 from Jeffrey A. Law --- Just threading doesn't create nonsensical blocks out of thin air. It may expose nonsensical code that already existed though. That's inherent in the path isolating nature of the transformation. But that's not what's going on in the example you posted. What's going on there is we have a memcpy where we know the source has only 3 bytes of stor= age, but we *may* pass in a length of 4 for the memcpy as "mystrlen" is opaque..= =20 That is precisely the kind of scenario where these warnings are supposed to trigger. I would strongly disagree with the recommendation not to warn because of information deduced from conditionals on the path. That would cripple the warnings in precisely the case where they're the most valuable IMHO.=