re PR sanitizer/70712 (False positive from AddressSanitizer with use of 'alignas')
PR sanitizer/70712 * cfgexpand.c (expand_stack_vars): Fix typo. * c-c++-common/asan/pr70712.c: New test. From-SVN: r235384
This commit is contained in:
parent
0e94da57dc
commit
d6c1a7a7c7
@ -1,3 +1,8 @@
|
||||
2016-04-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/70712
|
||||
* cfgexpand.c (expand_stack_vars): Fix typo.
|
||||
|
||||
2016-04-22 Szabolcs Nagy <szabolcs.nagy@arm.com>
|
||||
|
||||
* system.h (list, map, set, vector): Include conditionally.
|
||||
|
@ -1137,7 +1137,7 @@ expand_stack_vars (bool (*pred) (size_t), struct stack_vars_data *data)
|
||||
HOST_WIDE_INT prev_offset
|
||||
= align_base (frame_offset,
|
||||
MAX (alignb, ASAN_RED_ZONE_SIZE),
|
||||
FRAME_GROWS_DOWNWARD);
|
||||
!FRAME_GROWS_DOWNWARD);
|
||||
tree repr_decl = NULL_TREE;
|
||||
offset
|
||||
= alloc_stack_frame_space (stack_vars[i].size
|
||||
|
@ -1,3 +1,8 @@
|
||||
2016-04-23 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR sanitizer/70712
|
||||
* c-c++-common/asan/pr70712.c: New test.
|
||||
|
||||
2016-04-22 Trevor Saunders <tbsaunde+gcc@tbsaunde.org>
|
||||
|
||||
* .gitattributes: New file.
|
||||
|
32
gcc/testsuite/c-c++-common/asan/pr70712.c
Normal file
32
gcc/testsuite/c-c++-common/asan/pr70712.c
Normal file
@ -0,0 +1,32 @@
|
||||
/* PR sanitizer/70712 */
|
||||
/* { dg-do run } */
|
||||
|
||||
struct __attribute__((aligned (64))) S
|
||||
{
|
||||
char s[4];
|
||||
};
|
||||
|
||||
struct T
|
||||
{
|
||||
char t[8];
|
||||
char u[480];
|
||||
|
||||
};
|
||||
|
||||
__attribute__((noinline, noclone)) void
|
||||
foo (struct T *p, struct S *q)
|
||||
{
|
||||
__builtin_memset (p->t, '\0', sizeof (p->t));
|
||||
__builtin_memset (p->u, '\0', sizeof (p->u));
|
||||
__builtin_memset (q->s, '\0', sizeof (q->s));
|
||||
}
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
struct S s;
|
||||
struct T t;
|
||||
foo (&t, &s);
|
||||
asm volatile ("" : : "r" (&t), "r" (&s) : "memory");
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user