[compiler-rt] [sanitizer] Extract SANITIZER_FREEBSD version of ThreadDescriptorSizeFallback (PR #109743)

Florian Mayer via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 25 11:02:37 PDT 2024


================
@@ -219,25 +219,14 @@ static void GetGLibcVersion(int *major, int *minor, int *patch) {
 }
 #  endif  // SANITIZER_GLIBC && !SANITIZER_GO
 
-// On glibc x86_64, ThreadDescriptorSize() needs to be precise due to the usage
-// of g_tls_size. On other targets, ThreadDescriptorSize() is only used by lsan
-// to get the pointer to thread-specific data keys in the thread control block.
-#  if (SANITIZER_FREEBSD || SANITIZER_GLIBC) && !SANITIZER_GO
-// sizeof(struct pthread) from glibc.
-static uptr thread_descriptor_size;
-
-// FIXME: Implementation is very GLIBC specific, but it's used by FreeBSD.
+#  if SANITIZER_GLIBC && !SANITIZER_GO
----------------
fmayer wrote:

I think we can remove this?. This is already on L211

https://github.com/llvm/llvm-project/pull/109743


More information about the llvm-commits mailing list