From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 0FDCD3858416; Tue, 29 Aug 2023 14:59:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 0FDCD3858416 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1693321154; bh=6InC+x75s2tIj9A4GI0XU+JTjZiO5yF8o8y/ugaYX0I=; h=From:To:Subject:Date:In-Reply-To:References:From; b=Y7eC+lDVd2gjj/c563V+gepeO10jx+bzFnz3/Sr221MxIgetHO82ziW43nvtKjXip Jr2qqad0XGDqOmhqb1LkWX3eu4xYuo8/KMkLLggBKUPow2N0KwWM1Oi9A7eZZ9wkpm hiT/YSXcAHZFRoOZmHUpwETUxknBbxUBnrFbmL2I= From: "cvs-commit at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/105899] RFE: -fanalyzer could complain about misuses of standard C string APIs Date: Tue, 29 Aug 2023 14:59:12 +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: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: cvs-commit at gcc dot gnu.org X-Bugzilla-Status: ASSIGNED 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: 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=3D105899 --- Comment #12 from CVS Commits --- The master branch has been updated by David Malcolm : https://gcc.gnu.org/g:f687fc1ff6d4a44db87a35e9e3be7f20425bdacc commit r14-3549-gf687fc1ff6d4a44db87a35e9e3be7f20425bdacc Author: David Malcolm Date: Tue Aug 29 10:57:42 2023 -0400 analyzer: improve strdup handling [PR105899] gcc/analyzer/ChangeLog: PR analyzer/105899 * kf.cc (kf_strdup::impl_call_pre): Set size of dynamically-allocated buffer. Simulate copying the string from the source region to the new buffer. gcc/testsuite/ChangeLog: PR analyzer/105899 * c-c++-common/analyzer/pr99193-2.c: Add -Wno-analyzer-too-complex. * gcc.dg/analyzer/strdup-1.c: Include "analyzer-decls.h". (test_concrete_strlen): New. (test_symbolic_strlen): New. Signed-off-by: David Malcolm =