PR sanitizer/88333
* cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
* c-c++-common/asan/pr88333.c: New test.
From-SVN: r266817
+2018-12-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/88333
+ * cfgexpand.c (expand_stack_vars): If asan_vec is empty, start with
+ aligning frame offset to ASAN_RED_ZONE_SIZE bytes.
+
2018-12-05 Xianmiao Qu <xianmiao_qu@c-sky.com>
* config.gcc (csky-*-linux-gnu*): Force .init_array support.
&& frame_offset.is_constant (&prev_offset)
&& stack_vars[i].size.is_constant ())
{
+ if (data->asan_vec.is_empty ())
+ {
+ alloc_stack_frame_space (0, ASAN_RED_ZONE_SIZE);
+ prev_offset = frame_offset.to_constant ();
+ }
prev_offset = align_base (prev_offset,
MAX (alignb, ASAN_MIN_RED_ZONE_SIZE),
!FRAME_GROWS_DOWNWARD);
+2018-12-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/88333
+ * c-c++-common/asan/pr88333.c: New test.
+
2018-12-05 Alexandre Oliva <aoliva@redhat.com>
PR c++/85569
--- /dev/null
+/* PR sanitizer/88333 */
+/* { dg-do compile { target fstack_protector } } */
+/* { dg-options "-fstack-protector-strong -fsanitize=address" } */
+
+void bar (int *);
+
+void
+foo (void)
+{
+ int c;
+ bar (&c);
+}