2 /* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
3 /* { dg-shouldfail "asan" } */
5 #include <sanitizer/asan_interface.h>
13 strlen (const char *p
);
18 __asan_poison_memory_region ((char *)&a
[1], 1);
19 return __builtin_strlen (a
) + 1;
22 /* { dg-output "READ of size 2 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */
23 /* { dg-output " #1 0x\[0-9a-f\]+ +(in _*main (\[^\n\r]*strlen-overflow-1.c:19|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
24 /* { dg-output "\[^\n\r]*0x\[0-9a-f\]+ is located 0 bytes to the right of global variable" } */