summaryrefslogtreecommitdiff
path: root/lib/msan/msan_thread.cc
diff options
context:
space:
mode:
authorViktor Kutuzov <vkutuzov@accesssoftek.com>2014-11-26 10:42:02 +0000
committerViktor Kutuzov <vkutuzov@accesssoftek.com>2014-11-26 10:42:02 +0000
commit8e27368ae74ec8c32a25d86774ae00e57a68525a (patch)
treeccf4fdfbd6bb8dd35e608a47d95147c5814895a7 /lib/msan/msan_thread.cc
parentbd3af3867b456d86de4e2663fa359e651790eeef (diff)
[Msan] Check returning value of DTLS_Get()
Differential Revision: http://reviews.llvm.org/D6403 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@222818 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/msan/msan_thread.cc')
-rw-r--r--lib/msan/msan_thread.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/msan/msan_thread.cc b/lib/msan/msan_thread.cc
index 2a1e05a4e..f29a4b053 100644
--- a/lib/msan/msan_thread.cc
+++ b/lib/msan/msan_thread.cc
@@ -36,6 +36,7 @@ void MsanThread::ClearShadowForThreadStackAndTLS() {
if (tls_begin_ != tls_end_)
__msan_unpoison((void *)tls_begin_, tls_end_ - tls_begin_);
DTLS *dtls = DTLS_Get();
+ CHECK_NE(dtls, 0);
for (uptr i = 0; i < dtls->dtv_size; ++i)
__msan_unpoison((void *)(dtls->dtv[i].beg), dtls->dtv[i].size);
}