From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 50A8A389682D; Tue, 2 Mar 2021 21:49:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 50A8A389682D From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/95043] GCC 10 Analyzer and false positive on 'memcpy(dest, src, count);' Date: Tue, 02 Mar 2021 21:49:37 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 10.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dmalcolm at gcc dot gnu.org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: dmalcolm at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_status everconfirmed 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: Tue, 02 Mar 2021 21:49:37 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95043 David Malcolm changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |UNCONFIRMED Ever confirmed|1 |0 --- Comment #2 from David Malcolm --- I can reproduce a warning with the preprocessed source with gcc 10 at -O1 a= nd above; stripping out the line-markers with: perl -pi -e 's/^#.*\n//g;' idea.ii I get: https://godbolt.org/z/qxehzM which shows a diagnostic, where (I think) m_array is NULL from m_fallbackAllocator.allocate, which looks like a valid warning. With gcc 11, -Wanalyzer-too-complex shows that the analyzer is hitting the complexity limit and bailing out, without emitting the diagnostic.=