Mercurial > hg > CbC > CbC_gcc
view gcc/testsuite/c-c++-common/asan/pr61530.c @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 04ced10e8804 |
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" } */