re PR sanitizer/58543 (Invalid unpoisoning of stack redzones on ARM)

2013-10-31  Richard Sandiford  <rsandifo@linux.vnet.ibm.com>
	    Yury Gribov  <y.gribov@samsung.com>

	PR sanitizer/58543
	* asan.c (asan_clear_shadow): Allocate a new vreg for temporary
	shadow pointer to avoid clobbering the main one.

Co-Authored-By: Yury Gribov <y.gribov@samsung.com>

From-SVN: r204251
This commit is contained in:
Richard Sandiford 2013-10-31 12:10:01 +00:00 committed by Yury Gribov
parent 7dccc537ba
commit 57d4d653e8
2 changed files with 8 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2013-10-31 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
Yury Gribov <y.gribov@samsung.com>
PR sanitizer/58543
* asan.c (asan_clear_shadow): Allocate a new vreg for temporary
shadow pointer to avoid clobbering the main one.
2013-10-31 Zhenqiang Chen <zhenqiang.chen@linaro.org>
* lower-subreg.c (resolve_simple_move): Copy REG_INC note.

View File

@ -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);