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: [asan] Handle noreturn calls with __asan_handle_no_return ()


On Mon, Dec 10, 2012 at 10:44:49PM +0100, Dodji Seketeli wrote:
> Jakub Jelinek <jakub@redhat.com> writes:
> 
> > +++ gcc/asan.c	2012-12-05 15:30:56.069890542 +0100
> > @@ -1031,7 +1031,7 @@ instrument_builtin_call (gimple_stmt_ite
> >  {
> >    gimple call = gsi_stmt (*iter);
> >  
> > -  gcc_assert (is_gimple_builtin_call (call));
> > +  gcc_checking_assert (is_gimple_builtin_call (call));
> 
> Why is this change necessary?

It is not necessary, just it isn't as low cost as it would be good for
an assertion, it does:
  if (is_gimple_call (stmt)
      && (callee = gimple_call_fndecl (stmt))
      && is_builtin_fn (callee)
      && DECL_BUILT_IN_CLASS (callee) == BUILT_IN_NORMAL)
    return true;
and the caller calls that exact routine already:
  if (is_gimple_builtin_call (gsi_stmt (*iter)))
    return instrument_builtin_call (iter);
and this is the second statement in instrument_builtin_call.

	Jakub


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