Details
- Reviewers
eugenis MaskRay - Commits
- rG7475bd5411a3: [Msan] Add ptsname, ptsname_r interceptors
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
4876 | @eugenis implementation uses static buffer which can result in data race if called from multiple threads | |
4885 | BTW on some platforms including glibc ptsname is implemented with ptsname_r | |
compiler-rt/test/sanitizer_common/TestCases/Linux/ptsname.c | ||
5 | switched to getpt |
(glibc uses __ptsname_internal to implement ptsname, so technically for the lldb issue ptsname_r does not need to be intercepted)
I still slightly prefer posix_openpt because it works on FreeBSD automatically. FreeBSD does not have openpt
compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc | ||
---|---|---|
4885 | Nevermind, both use "__ptsname_r", not ptsname_r, so ptsname is not going to call ptsname_r inteceptor |
compiler-rt/test/sanitizer_common/TestCases/Linux/ptsname.c | ||
---|---|---|
21 | If you want to be nicer to FreeBSD... it does not have ptsname_r I'll not push this argument too hard because this directory is Linux :) |
clang-tidy: error: no template named 'AddrHashMap'; did you mean '__asan::AddrHashMap'? [clang-diagnostic-error]
not useful