summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Ostapenko <m.ostapenko@samsung.com>2016-12-02 16:35:08 +0300
committerMaxim Ostapenko <m.ostapenko@samsung.com>2016-12-02 16:35:57 +0300
commit984ca2f7f4f523eed7074e3af78252e724b62617 (patch)
tree0dce0dec4dcae1f2354235fba925ea40333ea3e2
parenta43f6c3d4b474fdc97e349dbd50ece6214890b18 (diff)
downloadlinaro-gcc-984ca2f7f4f523eed7074e3af78252e724b62617.tar.gz
linaro-gcc-984ca2f7f4f523eed7074e3af78252e724b62617.tar.bz2
linaro-gcc-984ca2f7f4f523eed7074e3af78252e724b62617.zip
Use last_alloca_addr as an indicator in asan_emit_stack_protection
Change-Id: I6a5a4b4f94d6af72a44cf685cc8e256881831fc5 Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
-rw-r--r--gcc/asan.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/asan.c b/gcc/asan.c
index f4c07bac570..aa3c75c16c0 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -1499,7 +1499,9 @@ asan_emit_stack_protection (rtx base, rtx pbase, unsigned int alignb,
asan_clear_shadow (shadow_mem, last_size >> ASAN_SHADOW_SHIFT);
}
- if (cfun->calls_alloca || !asan_stack_dynamic_offset_vec.is_empty ())
+ /* If last_alloca_addr != NULL_TREE then we need to perform unpoisoning stuff.
+ */
+ if (cfun->calls_alloca || (last_alloca_addr != NULL_TREE))
asan_emit_allocas_unpoison (orig_base, false);
do_pending_stack_adjust ();