[compiler-rt] 51d913a - [sanitizer] Remove CHECK from __sanitizer_get_dtls_size
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 17 18:21:31 PDT 2024
Author: Vitaly Buka
Date: 2024-09-17T18:21:20-07:00
New Revision: 51d913af827567e6a0999609e7e624a422781870
URL: https://github.com/llvm/llvm-project/commit/51d913af827567e6a0999609e7e624a422781870
DIFF: https://github.com/llvm/llvm-project/commit/51d913af827567e6a0999609e7e624a422781870.diff
LOG: [sanitizer] Remove CHECK from __sanitizer_get_dtls_size
The check is too strict. It works for 2.38 I have,
but not for older glibc which used different
allocation code.
The check was introduced with #108345.
Added:
Modified:
compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp
index a17a14882d0e15..0db8547268f4e2 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp
@@ -14,6 +14,7 @@
#include "sanitizer_allocator_interface.h"
#include "sanitizer_atomic.h"
+#include "sanitizer_common/sanitizer_common.h"
#include "sanitizer_flags.h"
#include "sanitizer_platform_interceptors.h"
@@ -115,7 +116,6 @@ SANITIZER_INTERFACE_WEAK_DEF(uptr, __sanitizer_get_dtls_size,
const void *start = __sanitizer_get_allocated_begin(tls_begin);
if (!start)
return 0;
- CHECK_EQ(start, tls_begin);
uptr tls_size = __sanitizer_get_allocated_size(start);
VReport(2, "__tls_get_addr: glibc DTLS suspected; tls={%p,0x%zx}\n",
tls_begin, tls_size);
More information about the llvm-commits
mailing list