This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [asan] Handle noreturn calls with __asan_handle_no_return ()
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Dodji Seketeli <dodji at redhat dot com>
- Cc: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 10 Dec 2012 22:53:14 +0100
- Subject: Re: [asan] Handle noreturn calls with __asan_handle_no_return ()
- References: <20121205144952.GV2315@tucnak.redhat.com> <87txrtmvji.fsf@redhat.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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