Index: lib/sanitizer_common/sanitizer_linux_libcdep.cc =================================================================== --- lib/sanitizer_common/sanitizer_linux_libcdep.cc +++ lib/sanitizer_common/sanitizer_linux_libcdep.cc @@ -185,11 +185,7 @@ static uptr g_tls_size; #ifdef __i386__ -# ifndef __GLIBC_PREREQ -# define CHECK_GET_TLS_STATIC_INFO_VERSION 1 -# else -# define CHECK_GET_TLS_STATIC_INFO_VERSION (!__GLIBC_PREREQ(2, 27)) -# endif +# define CHECK_GET_TLS_STATIC_INFO_VERSION 1 #else # define CHECK_GET_TLS_STATIC_INFO_VERSION 0 #endif @@ -227,8 +223,7 @@ // On i?86, _dl_get_tls_static_info used to be internal_function, i.e. // __attribute__((regparm(3), stdcall)) before glibc 2.27 and is normal // function in 2.27 and later. - if (CHECK_GET_TLS_STATIC_INFO_VERSION && - !dlvsym(RTLD_NEXT, "glob", "GLIBC_2.27")) + if (CHECK_GET_TLS_STATIC_INFO_VERSION && GetGlibcVersion(nullptr) < 27) CallGetTls(get_tls_static_info_ptr, &tls_size, &tls_align); else