| Issue |
97649
|
| Summary |
AddesssSanitizer cannot intercept stat when linking against glibc
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
ccotter
|
[`stat`, `fstat`, and a few others are provided as static symbols](https://stackoverflow.com/questions/66701091/what-is-the-purpose-of-libc-nonshared-a) on glibc based builds, rather than in the libc shared object. This means AddressSanitizer's interceptor cannot intercept `stat`. E.g., I'd expect for https://godbolt.org/z/EMcxfh8qn to bail out upon `stat` being passed a freed pointer, but the program does not crash since `stat` is statically linked. `-static-libasan` does not change the situation.
Are there are any techniques to get `stat` and friends to be intercepted properly when linking against glibc (or any other toolchains/libraries that link against a static `stat`? If not, what can we do to improve this situation?
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs