From: Jakub Jelinek <jakub@redhat.com>
To: Martin Sebor <msebor@gmail.com>
Cc: Richard Biener <rguenther@suse.de>,
Jeff Law <jeffreyalaw@gmail.com>,
gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] warn-access: Fix up check_pointer_uses [PR104715]
Date: Wed, 2 Mar 2022 11:12:57 +0100 [thread overview]
Message-ID: <Yh9DKaEPvtDS31rD@tucnak> (raw)
In-Reply-To: <2f312e75-772b-e8b6-ecbe-01daff873526@gmail.com>
On Tue, Mar 01, 2022 at 12:07:49PM -0700, Martin Sebor wrote:
> Thanks for the fix. It makes sense to me. Besides the test for
> the false positives I would suggest to add one to verify that using
> the first argument to a strstr() call is diagnosed if it's dangling
> (both as is, as well as with an offset from the first element).
> There are tests for memchr and strchr in the -Wdangling-pointer
> test suite but none for strstr.
Thanks for adding that test.
Note, as I wrote in the PR, I think we should handle BUILT_IN_STRPBRK
like BUILT_IN_STRSTR in pass_waccess::gimple_call_return_arg, but as
that would emit further warnings, I think that has to be a GCC 13 material.
Jakub
prev parent reply other threads:[~2022-03-02 10:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 18:41 Jakub Jelinek
2022-03-01 19:07 ` Martin Sebor
2022-03-01 20:03 ` Richard Biener
2022-03-02 10:12 ` Jakub Jelinek [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=Yh9DKaEPvtDS31rD@tucnak \
--to=jakub@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jeffreyalaw@gmail.com \
--cc=msebor@gmail.com \
--cc=rguenther@suse.de \
/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: link
Be 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).