public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: Martin Sebor <msebor@gmail.com>,
	Gcc Patch List <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] enhance -Warray-bounds to detect out-of-bounds offsets (PR 82455)
Date: Wed, 15 Nov 2017 01:52:00 -0000	[thread overview]
Message-ID: <4c072ed3-6b14-01f0-b22a-4490f9350cfc@redhat.com> (raw)
In-Reply-To: <alpine.LSU.2.20.1711140937020.12252@zhemvz.fhfr.qr>

On 11/14/2017 01:42 AM, Richard Biener wrote:

> 
> I suspect once you're dealing with C++ code you run into the issue
> that even early inlining exposes code with forwprop run on it
> before running forwprop again on the inlined-into body.
> 
> So the IPA issues start very early.  Of course if you are doing
> path-sensitive processing then processing call/return "edges" as if
> they were CFG edges shouldn't be too hard.
> 
> Then the only issue remaining is that there are very many
> paths in a program compared to # edges or # blocks which means
> you'll quickly run into compile-time issues.
Yup.  There's a reason why static analysis is usually not on by default.
   It's bloody expensive.

> 
> Static analyzers are hard ;)  But I appreciate somebody finally
> trying that route.  Ideally we'd do the static analysis in parallel
> to the compilation given we'd need an "early" LTO phase before
> early inlining.  Thus do a LTO out then in parallel do WPA
> static analysis with diagnostics.
> 
No doubt.  I wouldn't even say we're going that route, at least not in
any real sense.  The walkers would probably be structured differently
than what we're doing and have to hook in much earlier.  You have to
build both the callgraph walker as well as the CFG walker and the
ability to pass data back and forth between them.  You'd also have to
finish all the deferred folding stuff so that what you analyze is closer
to the actual source.

We're just building on the existing infrastructure we have to give
better function scoped warnings.

jeff

  reply	other threads:[~2017-11-15  0:52 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-29 16:15 Martin Sebor
2017-10-30 11:55 ` Richard Biener
2017-10-30 15:21   ` Martin Sebor
2017-10-30 19:59     ` Richard Biener
2017-10-30 20:40       ` Martin Sebor
2017-10-30 21:23         ` Richard Biener
2017-10-30 21:49           ` Martin Sebor
2017-11-02 11:48             ` Richard Biener
2017-11-10  1:12               ` Jeff Law
2017-11-10  8:25                 ` Richard Biener
2017-11-14  0:04                   ` Jeff Law
2017-11-14  9:11                     ` Richard Biener
2017-11-15  1:52                       ` Jeff Law [this message]
2017-11-14  5:22                   ` Martin Sebor
2017-11-14  9:13                     ` Richard Biener
2017-11-15  1:54                     ` Jeff Law
2017-10-30 22:16     ` Jeff Law
2017-10-30 23:30       ` Martin Sebor
2017-10-31  4:32         ` Jeff Law
2017-11-01 22:21           ` Martin Sebor
2017-11-02 11:27           ` Richard Biener
2017-10-30 22:16 ` 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=4c072ed3-6b14-01f0-b22a-4490f9350cfc@redhat.com \
    --to=law@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).