[compiler-rt] 3d1d715 - [sanitizer] Don't call __tls_get_addr on s390x after D98926

Yvan Roux via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 21 01:56:23 PDT 2021


Hi Fangrui,

it seems that this commit broke AArch64 full bot, the first issues were
here observed in the link below,

https://lab.llvm.org/buildbot/#/builders/7/builds/2496


On Sun, 18 Apr 2021 at 19:42, Fangrui Song via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

>
> Author: Fangrui Song
> Date: 2021-04-18T10:42:44-07:00
> New Revision: 3d1d7156e9a9a794ba649b79e27fe448274fd558
>
> URL:
> https://github.com/llvm/llvm-project/commit/3d1d7156e9a9a794ba649b79e27fe448274fd558
> DIFF:
> https://github.com/llvm/llvm-project/commit/3d1d7156e9a9a794ba649b79e27fe448274fd558.diff
>
> LOG: [sanitizer] Don't call __tls_get_addr on s390x after D98926
>
> glibc s390x doesn't define __tls_get_addr.
>
> Fix PR50017
>
> Added:
>
>
> Modified:
>     compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
> b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
> index d5f61e10d7530..f1a0f8948f905 100644
> --- 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) {
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/b5113ff1/attachment-0001.html>


More information about the llvm-commits mailing list