public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Martin Sebor <msebor@gmail.com>, gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] warn for integer overflow in allocation calls (PR 96838)
Date: Fri, 20 Nov 2020 22:07:29 -0700	[thread overview]
Message-ID: <d2d33347-c0d9-776c-be39-5ca7b528c21a@redhat.com> (raw)
In-Reply-To: <ab0391cf-7eb6-ab6e-4618-4beb172671e0@gmail.com>



On 11/9/20 9:00 AM, Martin Sebor wrote:
> Ping:
> https://gcc.gnu.org/pipermail/gcc-patches/2020-September/554000.html
>
> Jeff, I don't expect to have the cycles to reimplement this patch
> using the Ranger APIs before stage 1 closes.  I'm open to giving
> it a try in stage 3 if it's still in scope for GCC 11.  Otherwise,
> is this patch okay to commit?
So all we're going to get from the ranger is ranges of operands, right? 
Meaning that we still need to either roll our own evaluator
(eval_size_vflow) or overload range_for_stmt with our own, which likely
looks like eval_size_vflow anyway, right?

My hope was to avoid the roll our own evaluator, but that doesn't look
like it's in the cards in the reasonably near future.

If my summary of the current state is correct, then I'd suggest we go
with the patch as-is.  If we want to override eval_size_vflow in the
future, we can still do that.  And if we want to replace the call to
determine_value_range with a ranger API, that seems like a fairly
straightforward change to make in gcc-12.



Jeff


  reply	other threads:[~2020-11-21  5:07 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-15 19:47 Martin Sebor
2020-09-16  9:39 ` Bernhard Reutner-Fischer
2020-09-17  3:23 ` Jeff Law
2020-09-17 16:08   ` Martin Sebor
2020-09-17 18:39     ` Andrew MacLeod
2020-09-17 20:18       ` Martin Sebor
2020-09-18  6:29         ` Aldy Hernandez
2020-09-19 21:22           ` Martin Sebor
2020-09-20  6:39             ` Aldy Hernandez
2020-09-21 15:13               ` Martin Sebor
2020-11-09 16:00                 ` Martin Sebor
2020-11-21  5:07                   ` Jeff Law [this message]
2020-11-21 13:26                     ` Andrew MacLeod
2020-11-23 21:38                       ` Martin Sebor
2020-11-24 17:42                         ` Andrew MacLeod
2020-11-24 17:44                           ` Andrew MacLeod
2020-11-24 18:39                             ` Martin Sebor
2020-12-04 19:14                               ` Jeff Law

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=d2d33347-c0d9-776c-be39-5ca7b528c21a@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=msebor@gmail.com \
    /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).