public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "cvs-commit at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107565] [12 Regression] -Wanalyzer-use-of-uninitialized-value false positive with rdrand Date: Fri, 03 Mar 2023 23:01:03 +0000 [thread overview] Message-ID: <bug-107565-4-AJJYwxemUu@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107565-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107565 --- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>: https://gcc.gnu.org/g:56572a08ec4a0fc1a7802d3737cd7f7cc9089c4b commit r13-6466-g56572a08ec4a0fc1a7802d3737cd7f7cc9089c4b Author: David Malcolm <dmalcolm@redhat.com> Date: Fri Mar 3 17:59:21 2023 -0500 analyzer: provide placeholder implementation of sprintf Previously, the analyzer lacked a known_function implementation of sprintf, and thus would handle calls to sprintf with the "anything could happen" fallback. Whilst working on PR analyzer/107565 I noticed that this was preventing a lot of genuine memory leaks from being reported for Doom; fixing thusly. Integration testing of the effect of the patch shows a big increase in true positives due to the case mentioned in Doom, and one new false positive (in pcre2), which I'm tracking as PR analyzer/109014. Comparison: GOOD: 67 -> 123 (+56); 10.91% -> 18.33% BAD: 547 -> 548 (+1) where the affected warnings/projects are: -Wanalyzer-malloc-leak: GOOD: 0 -> 56 (+56); 0.00% -> 41.48% BAD: 79 True positives: 0 -> 56 (+56) (all in Doom) -Wanalyzer-use-of-uninitialized-value: GOOD: 0; 0.00% BAD: 80 -> 81 (+1) False positives: pcre2-10.42: 0 -> 1 (+1) gcc/analyzer/ChangeLog: * kf.cc (class kf_sprintf): New. (register_known_functions): Register it. gcc/testsuite/ChangeLog: * gcc.dg/analyzer/doom-d_main-IdentifyVersion.c: New test. * gcc.dg/analyzer/sprintf-1.c: New test. * gcc.dg/analyzer/sprintf-concat.c: New test. Signed-off-by: David Malcolm <dmalcolm@redhat.com>
next prev parent reply other threads:[~2023-03-03 23:01 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-11-08 1:15 [Bug analyzer/107565] New: " eggert at cs dot ucla.edu 2022-11-08 5:39 ` [Bug target/107565] " pinskia at gcc dot gnu.org 2022-11-08 14:06 ` [Bug target/107565] [12/13 Regression] " dmalcolm at gcc dot gnu.org 2023-01-13 10:19 ` rguenth at gcc dot gnu.org 2023-01-13 12:44 ` [Bug analyzer/107565] " rguenth at gcc dot gnu.org 2023-03-01 14:32 ` dmalcolm at gcc dot gnu.org 2023-03-01 22:26 ` cvs-commit at gcc dot gnu.org 2023-03-01 22:34 ` dmalcolm at gcc dot gnu.org 2023-03-03 23:01 ` cvs-commit at gcc dot gnu.org [this message] 2023-05-08 12:25 ` [Bug analyzer/107565] [12 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-107565-4-AJJYwxemUu@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).