projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e880c19
)
[sanitizer] Don't call __tls_get_addr on s390x after D98926
author
Fangrui Song
<i@maskray.me>
Sun, 18 Apr 2021 17:42:43 +0000
(10:42 -0700)
committer
Fangrui Song
<i@maskray.me>
Sun, 18 Apr 2021 17:42:44 +0000
(10:42 -0700)
glibc s390x doesn't define __tls_get_addr.
Fix PR50017
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
index
d5f61e1
..
f1a0f89
100644
(file)
--- a/
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
+++ b/
compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
@@
-322,11
+322,13
@@
static int CollectStaticTlsBlocks(struct dl_phdr_info *info, size_t size,
if (!info->dlpi_tls_modid)
return 0;
uptr begin = (uptr)info->dlpi_tls_data;
+#ifndef __s390__
if (!g_use_dlpi_tls_data) {
// Call __tls_get_addr as a fallback. This forces TLS allocation on glibc
// and FreeBSD.
size_t mod_and_off[2] = {info->dlpi_tls_modid, 0};
begin = (uptr)__tls_get_addr(mod_and_off);
+#endif
}
for (unsigned i = 0; i != info->dlpi_phnum; ++i)
if (info->dlpi_phdr[i].p_type == PT_TLS) {