This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix -fcompare-debug issue in cp_maybe_instrument_return (PR sanitizer/86406)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Richard Biener <rguenther at suse dot de>
- Cc: Alexandre Oliva <aoliva at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 10 Jul 2018 10:03:03 +0200
- Subject: Re: [PATCH] Fix -fcompare-debug issue in cp_maybe_instrument_return (PR sanitizer/86406)
- References: <20180710073404.GD7166@tucnak> <alpine.LSU.firstname.lastname@example.org>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Jul 10, 2018 at 10:01:10AM +0200, Richard Biener wrote:
> On Tue, 10 Jul 2018, Jakub Jelinek wrote:
> > cp_maybe_instrument_return is looking for a return stmt at the end of
> > function to decide whether to omit -fsanitize=return instrumentation or
> > __builtin_unreachable addition. If a STATEMENT_LIST has a return followed
> > by DEBUG_BEGIN_STMT (or multiple of them), it doesn't find the return
> > though.
> > Fixed thusly, bootstrapped/regtested on x86_64-linux and i686-linux, ok for
> > trunk?
> OK. This also affects the branch?
8.x only, will commit it there too.
> > 2018-07-10 Jakub Jelinek <email@example.com>
> > PR sanitizer/86406
> > * cp-gimplify.c (cp_maybe_instrument_return): Skip trailing
> > DEBUG_BEGIN_STMTs.
> > * g++.dg/ubsan/pr86406.C: New test.