public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "dmalcolm at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/107225] FP with -Wanalyzer-mismatching-deallocation Date: Wed, 12 Oct 2022 15:16:11 +0000 [thread overview] Message-ID: <bug-107225-4-jEK1oYA1CJ@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-107225-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107225 --- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> --- Thanks for filing this bug. As far as I can tell, the aliasing implementation gets confused at: 1313 | x_hdrs[num_x_hdrs++] = strdup(line); | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~ for the case where x_hdrs is NULL (which -fanalyzer does seem to complain about) and considers that the write to NULL[0] could modify file's buffer (which it clearly can't, or at least, it's clear to a human that it can't). I think it's fixable by making the -fanalyzer's aliasing code consider that writes through NULL don't alias anything.
prev parent reply other threads:[~2022-10-12 15:16 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-10-12 1:09 [Bug analyzer/107225] New: " urs at akk dot org 2022-10-12 1:11 ` [Bug analyzer/107225] " urs at akk dot org 2022-10-12 15:16 ` dmalcolm at gcc dot gnu.org [this message]
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-107225-4-jEK1oYA1CJ@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).