[sanitizer] Improve accuracy of GetTls on x86/s390
authorFangrui Song <i@maskray.me>
Tue, 30 Mar 2021 05:14:29 +0000 (22:14 -0700)
committerFangrui Song <i@maskray.me>
Tue, 30 Mar 2021 05:14:29 +0000 (22:14 -0700)
commit58c62fd9768594ec8dd57e8320ba2396bf8b87e5
treeb1c2ba780126230de8be72b7b99825e2b1c8798c
parent749e609ec969d2802407851f3c4c0e62c3946610
[sanitizer] Improve accuracy of GetTls on x86/s390

The previous code may underestimate the static TLS surplus part, which may cause
false positives to LeakSanitizer if a dynamically loaded module uses the surplus
and there is an allocation only referenced by a thread's TLS.
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp