From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 884223858C54; Fri, 23 Sep 2022 13:00:53 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 884223858C54 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663938053; bh=zai/IcFF6XlN5qy9SdAZePEBYUHTZ6QySXNls9QQd0s=; h=From:To:Subject:Date:From; b=ZNY1QkfONlOg7u57nJv9o7AN79MFz6aCH6BL3jorkwTNQlUYg+UXCNau+zrNxQgmF b+Cfgr4XIkiAJEJYcI4FD91ji3hAy//t3vBH/zUMHCMnK0xLd+3+PEBXnVpJGfKM8S ZQud2TGw0Zxu595g3OKeJBBt0gyx8kQ7jbpF87cs= From: "dmalcolm at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107017] New: RFE: support printf-style formatted functions in -fanalyzer Date: Fri, 23 Sep 2022 13:00:53 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: analyzer X-Bugzilla-Version: 13.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_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: 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=3D107017 Bug ID: 107017 Summary: RFE: support printf-style formatted functions in -fanalyzer Product: gcc Version: 13.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: dmalcolm at gcc dot gnu.org Target Milestone: --- We currently have some support for parsing the insides of a printf-style fo= rmat string in two places: * gcc/c-family/c-format.cc: implements -Wformat in the C/C++ frontends, doi= ng type-checking on format strings against their arguments * gcc/gimple-ssa-sprintf.cc: implements parts of -Wformat_overflow=3D, -Wformat_truncation=3D, and -Wrestrict. Now that the analyzer has -Wanalyzer-out-of-bounds, it might be good to generalize this format-string parsing so that the analyzer can reuse it, an= d do similar range analysis (but with the analyzer's more precise path-sensitive interprocedural approach)=