Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/asan/pr61530.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
line wrap: on
line source
/* { dg-do run } */ /* { dg-shouldfail "asan" } */ __attribute__((noinline,noclone)) void foo (char *a, char *b) { a[0] = b[0] = 0; __builtin_memcpy(a, b, 4); } int main () { char a, b; foo (&a, &b); return 0; } /* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */