This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs
- From: Marek Polacek <polacek at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Gerald Pfeifer <gerald at pfeifer dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 3 Jul 2014 12:55:50 +0200
- Subject: Re: [PATCH] Implement -fsanitize=bounds and internal calls in FEs
- Authentication-results: sourceware.org; auth=none
- References: <20140619145653 dot GL17965 at redhat dot com> <20140619171931 dot GR31640 at tucnak dot redhat dot com> <20140620084304 dot GN17965 at redhat dot com> <20140620085747 dot GV31640 at tucnak dot redhat dot com> <20140620093426 dot GP17965 at redhat dot com> <20140620093923 dot GW31640 at tucnak dot redhat dot com> <20140620100234 dot GA14420 at redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1406281849280 dot 30120 at tuna dot site> <20140703104145 dot GM20427 at redhat dot com> <20140703104634 dot GD31640 at tucnak dot redhat dot com>
On Thu, Jul 03, 2014 at 12:46:35PM +0200, Jakub Jelinek wrote:
> On Thu, Jul 03, 2014 at 12:41:46PM +0200, Marek Polacek wrote:
> > On Sat, Jun 28, 2014 at 06:52:00PM +0200, Gerald Pfeifer wrote:
> > > On Fri, 20 Jun 2014, Marek Polacek wrote:
> > > +@item -fsanitize=bounds
> > > +@opindex fsanitize=bounds
> > > +
> > > +This option enables instrumentation of array bounds. Various out of bounds
> > > +accesses are detected. Flexible array members are not instrumented, as well
> > > +as initializers of variables with static storage.
> > >
> > > Can you make this "Flexible array members and initializers..." (or
> > > "...as well as...")? The current wording confused me a bit at first.
> > >
> > > And I believe there should be no empty line after @opindex.
> > Thanks, I'll fix both with the following. Also
> > -fsanitize=float-divide-by-zero and -fsanitize=float-cast-overflow
> > descriptions were at a wrong place, so moved a little bit above.
> > Applying to trunk as obvious.
> > 2014-07-03 Marek Polacek <email@example.com>
> > * doc/invoke.texi (-fsanitize=bounds): Tweak wording.
> > (-fsanitize=float-divide-by-zero): Move to the table with
> > -fsanitize=undefined suboptions.
> > (-fsanitize=float-cast-overflow): Likewise.
> Those two aren't -fsanitize=undefined suboptions, so shouldn't be included
> in there.
But they're parts of ubsan and at least
-fsanitize=float-divide-by-zero says it is not enabled by
-fsanitize=undefined. Dunno, I can move it back if you want.