forked from OSchip/llvm-project
[TSan] Fix static TLS boundaries calculations in __tls_get_addr interceptor.
Summary: DTLS_on_tls_get_addr expects (tls_addr + tls_size) as the last parameter, static_tls_end. Reviewers: dvyukov Subscribers: kubamracek, delcypher, #sanitizers, llvm-commits Differential Revision: https://reviews.llvm.org/D43325 llvm-svn: 325276
This commit is contained in:
parent
2061ad2f83
commit
48296ebf8b
|
@ -2535,7 +2535,8 @@ TSAN_INTERCEPTOR(void *, __tls_get_addr, void *arg) {
|
|||
ThreadState *thr = cur_thread();
|
||||
if (!thr)
|
||||
return res;
|
||||
DTLS::DTV *dtv = DTLS_on_tls_get_addr(arg, res, thr->tls_addr, thr->tls_size);
|
||||
DTLS::DTV *dtv = DTLS_on_tls_get_addr(arg, res, thr->tls_addr,
|
||||
thr->tls_addr + thr->tls_size);
|
||||
if (!dtv)
|
||||
return res;
|
||||
// New DTLS block has been allocated.
|
||||
|
|
Loading…
Reference in New Issue