* [asan] Another ICE fix
@ 2012-11-27 18:46 Jakub Jelinek
2012-12-03 13:49 ` Dodji Seketeli
0 siblings, 1 reply; 2+ messages in thread
From: Jakub Jelinek @ 2012-11-27 18:46 UTC (permalink / raw)
To: Dodji Seketeli; +Cc: gcc-patches
Hi!
E.g. on c_char_tests.f03 we have a stmt like
_2 = VIEW_CONVERT_EXPR<character(kind=1)[1:1]>(121)[1]{lb: 1 sz: 1};
after inlining (wonder why we never fold that to 121), which asan
incorrectly considered to be a load and thus attempted to instrument it,
by taking address of the rhs.
Fixed thusly, ok for trunk?
2012-11-27 Jakub Jelinek <jakub@redhat.com>
* asan.c (instrument_assignment): Instrument lhs only
for gimple_store_p and rhs1 only for gimple_assign_load_p.
--- gcc/asan.c.jj 2012-11-27 17:37:10.000000000 +0100
+++ gcc/asan.c 2012-11-27 18:37:21.316247456 +0100
@@ -1358,10 +1358,12 @@ instrument_assignment (gimple_stmt_itera
gcc_assert (gimple_assign_single_p (s));
- instrument_derefs (iter, gimple_assign_lhs (s),
- gimple_location (s), true);
- instrument_derefs (iter, gimple_assign_rhs1 (s),
- gimple_location (s), false);
+ if (gimple_store_p (s))
+ instrument_derefs (iter, gimple_assign_lhs (s),
+ gimple_location (s), true);
+ if (gimple_assign_load_p (s))
+ instrument_derefs (iter, gimple_assign_rhs1 (s),
+ gimple_location (s), false);
}
/* Instrument the function call pointed to by the iterator ITER, if it
Jakub
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [asan] Another ICE fix
2012-11-27 18:46 [asan] Another ICE fix Jakub Jelinek
@ 2012-12-03 13:49 ` Dodji Seketeli
0 siblings, 0 replies; 2+ messages in thread
From: Dodji Seketeli @ 2012-12-03 13:49 UTC (permalink / raw)
To: Jakub Jelinek; +Cc: Dodji Seketeli, gcc-patches
Jakub Jelinek <jakub@redhat.com> writes:
> Fixed thusly, ok for trunk?
>
> 2012-11-27 Jakub Jelinek <jakub@redhat.com>
>
> * asan.c (instrument_assignment): Instrument lhs only
> for gimple_store_p and rhs1 only for gimple_assign_load_p.
This is OK, thanks.
And sorry for the delay.
--
Dodji
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-03 13:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-27 18:46 [asan] Another ICE fix Jakub Jelinek
2012-12-03 13:49 ` Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).