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