This fixes an ASan test failure: TestCases/Linux/static_tls.cpp.
The original code was introduced by rG809a42e3d535.
Details
Details
- Reviewers
eugenis EccoTheDolphin lenary asb - Commits
- rG7ddd354d47cc: [RISCV][ASAN] Fix TLS offsets
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | ||
---|---|---|
379–381 | (I would use __builtin_thread_pointer, but IIRC that's not supported by GCC for RISC-V, and the code for the sanitizers is shared between codebases) |
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | ||
---|---|---|
379–381 | We should leave a TODO, I think we've (recently) agreed that __builtin_thread_pointer will always return tp. |
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp | ||
---|---|---|
379–381 | RISC-V GCC has implemented __builtin_thread_pointer, so I think it's fine to use that. https://github.com/gcc-mirror/gcc/commit/1073b500e5d33af8b75567108a8c04fe2598df2b |
(I would use __builtin_thread_pointer, but IIRC that's not supported by GCC for RISC-V, and the code for the sanitizers is shared between codebases)