Author: Vitaly Buka Date: 2024-09-11T14:51:10-07:00 New Revision: c971a0b9fd3fcf7ff6e87d17c36c58bf090da863
URL: https://github.com/llvm/llvm-project/commit/c971a0b9fd3fcf7ff6e87d17c36c58bf090da863 DIFF: https://github.com/llvm/llvm-project/commit/c971a0b9fd3fcf7ff6e87d17c36c58bf090da863.diff LOG: Take into account kDtvOffset 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 a1107ff7d24737..6e77676fabf091 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp @@ -152,8 +152,8 @@ DTLS::DTV *DTLS_on_tls_get_addr(void *arg_void, void *res, tls_size = 0; } if (tls_size) { - CHECK_LE(tls_beg, reinterpret_cast<uptr>(res)); - CHECK_LT(reinterpret_cast<uptr>(res), tls_beg + tls_size); + CHECK_LE(tls_beg, reinterpret_cast<uptr>(res) + kDtvOffset); + CHECK_LT(reinterpret_cast<uptr>(res) + kDtvOffset, tls_beg + tls_size); } dtv->beg = tls_beg; dtv->size = tls_size; _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits