This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix -fcompare-debug issue in cp_maybe_instrument_return (PR sanitizer/86406)


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  <jakub@redhat.com>
> > 
> > 	PR sanitizer/86406
> > 	* cp-gimplify.c (cp_maybe_instrument_return): Skip trailing
> > 	DEBUG_BEGIN_STMTs.
> > 
> > 	* g++.dg/ubsan/pr86406.C: New test.

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]