re PR sanitizer/88619 (ICE in asan_emit_stack_protection, at asan.c:1574 since r266664)

PR sanitizer/88619
	* cfgexpand.c (expand_stack_vars): Only align prev_offset to
	ASAN_MIN_RED_ZONE_SIZE, not to maximum of that and alignb.

	* c-c++-common/asan/pr88619.c: New test.

From-SVN: r267633
This commit is contained in:
Jakub Jelinek 2019-01-07 09:50:57 +01:00 committed by Jakub Jelinek
parent d8fcab6894
commit 76192f9356
4 changed files with 22 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2019-01-07 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/88619
* cfgexpand.c (expand_stack_vars): Only align prev_offset to
ASAN_MIN_RED_ZONE_SIZE, not to maximum of that and alignb.
PR c++/85052
* tree-vect-generic.c: Include insn-config.h and recog.h.
(expand_vector_piecewise): Add defaulted ret_type argument,

View File

@ -1130,7 +1130,7 @@ expand_stack_vars (bool (*pred) (size_t), struct stack_vars_data *data)
prev_offset = frame_offset.to_constant ();
}
prev_offset = align_base (prev_offset,
MAX (alignb, ASAN_MIN_RED_ZONE_SIZE),
ASAN_MIN_RED_ZONE_SIZE,
!FRAME_GROWS_DOWNWARD);
tree repr_decl = NULL_TREE;
unsigned HOST_WIDE_INT size

View File

@ -1,5 +1,8 @@
2019-01-07 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/88619
* c-c++-common/asan/pr88619.c: New test.
PR c++/85052
* c-c++-common/builtin-convertvector-1.c: New test.
* c-c++-common/torture/builtin-convertvector-1.c: New test.

View File

@ -0,0 +1,14 @@
/* PR sanitizer/88619 */
/* { dg-do compile { target fstack_protector } } */
/* { dg-options "-fstack-protector-strong -fsanitize=address" } */
typedef int A __attribute__((aligned (64)));
int
main ()
{
A b;
int *p = &b;
*(p - 1) = 123;
__builtin_alloca (b);
}