From a15fa55a4a13bde63a86422bba672b3af8232a31 Mon Sep 17 00:00:00 2001 From: ygribov Date: Thu, 31 Oct 2013 12:10:01 +0000 Subject: 2013-10-31 Richard Sandiford Yury Gribov PR sanitizer/58543 * asan.c (asan_clear_shadow): Allocate a new vreg for temporary shadow pointer to avoid clobbering the main one. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204251 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/asan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gcc/asan.c') diff --git a/gcc/asan.c b/gcc/asan.c index f2934b0490d..81397198f60 100644 --- a/gcc/asan.c +++ b/gcc/asan.c @@ -898,7 +898,7 @@ asan_clear_shadow (rtx shadow_mem, HOST_WIDE_INT len) gcc_assert ((len & 3) == 0); top_label = gen_label_rtx (); - addr = force_reg (Pmode, XEXP (shadow_mem, 0)); + addr = copy_to_mode_reg (Pmode, XEXP (shadow_mem, 0)); shadow_mem = adjust_automodify_address (shadow_mem, SImode, addr, 0); end = force_reg (Pmode, plus_constant (Pmode, addr, len)); emit_label (top_label); -- cgit v1.2.1