From: Jakub Jelinek Date: Mon, 3 Dec 2012 13:57:29 +0000 (+0100) Subject: asan.c (instrument_assignment): Instrument lhs only for gimple_store_p and rhs1 only... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=52f2e7e1e986b933049b2ebf98b6004a24a54501;p=gcc.git asan.c (instrument_assignment): Instrument lhs only for gimple_store_p and rhs1 only for gimple_assign_load_p. * asan.c (instrument_assignment): Instrument lhs only for gimple_store_p and rhs1 only for gimple_assign_load_p. From-SVN: r194087 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a886c0480cd..455420e672f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-12-03 Jakub Jelinek + + * asan.c (instrument_assignment): Instrument lhs only + for gimple_store_p and rhs1 only for gimple_assign_load_p. + 2012-12-03 Michael Zolotukhin * Makefile.in: Add target mddump, build/genmddump.o. Extend diff --git a/gcc/asan.c b/gcc/asan.c index 26c4178a9f0..2563a305b20 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -1339,10 +1339,12 @@ instrument_assignment (gimple_stmt_iterator *iter) 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