1 // If user provides his own libc functions, ASan doesn't
2 // intercept these functions.
5 // { dg-options "-fno-builtin-malloc -fno-builtin-free" }
6 // { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
11 extern "C" long strtol(const char *nptr, char **endptr, int base) {
12 fprintf(stderr, "my_strtol_interceptor\n");
17 char *x = (char*)malloc(10);
19 return (int)strtol(x, 0, 10);
22 // { dg-output "my_strtol_interceptor" }