setlocale interceptor imitates a write into result,
which may be located in .rodata section.
This is the only interceptor that tries to do this and
I think the intention was to initialize the range for msan.
So do that instead. Writing into .rodata shouldn't happen
(without crashing later on the actual write) and this
traps on my local tsan experiments.
Details
- Reviewers
vitalybuka - Commits
- rG23596fece043: sanitizer_common: don't write into .rodata
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Can you make compiler-rt/test/sanitizer_common/TestCases/setlocale.cpp to fail without patch?
It's not possible now. Currently tsan handles it and that's why we did not notice it earlier (it would crash on our internal codebase otherwise).
I noticed it only while making some significant changes to tsan runtime.
clang-tidy: error: no template named 'AddrHashMap'; did you mean '__asan::AddrHashMap'? [clang-diagnostic-error]
not useful