diff options
author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-06-25 11:30:35 +0000 |
---|---|---|
committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-06-25 11:30:35 +0000 |
commit | 226906f2c3a6d4e997256bf8f6c562bfd2cb2184 (patch) | |
tree | 588568272ea1aa076ba45ead66d4bb63ce063c14 /lib/sanitizer_common/sanitizer_tls_get_addr.h | |
parent | 4f598d5c528f370172f8364832d18fe2e35d6f84 (diff) | |
download | compiler-rt-226906f2c3a6d4e997256bf8f6c562bfd2cb2184.tar.gz |
[msan] Fix false positive on dynamic tls.
Use existing DTLS code in sanitizer_tls_get_addr.{h,cc} to unpoison DTLS
blocks both on allocation and deallocation.
https://code.google.com/p/memory-sanitizer/issues/detail?id=44
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@211683 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_tls_get_addr.h')
-rw-r--r-- | lib/sanitizer_common/sanitizer_tls_get_addr.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/sanitizer_common/sanitizer_tls_get_addr.h b/lib/sanitizer_common/sanitizer_tls_get_addr.h index a64f11e0b..0fc9a2257 100644 --- a/lib/sanitizer_common/sanitizer_tls_get_addr.h +++ b/lib/sanitizer_common/sanitizer_tls_get_addr.h @@ -48,7 +48,9 @@ struct DTLS { uptr last_memalign_ptr; }; -void DTLS_on_tls_get_addr(void *arg, void *res); +// Returns pointer and size of a linker-allocated TLS block. +// Each block is returned exactly once. +DTLS::DTV *DTLS_on_tls_get_addr(void *arg, void *res); void DTLS_on_libc_memalign(void *ptr, uptr size); DTLS *DTLS_Get(); void DTLS_Destroy(); // Make sure to call this before the thread is destroyed. |