[all-commits] [llvm/llvm-project] b1bd52: Fix tls_get_addr handling for glibc >=2.25
Thurston Dang via All-commits
all-commits at lists.llvm.org
Fri Apr 14 11:47:13 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: b1bd52cd0d8627df1187448b8247a9c7a4675019
https://github.com/llvm/llvm-project/commit/b1bd52cd0d8627df1187448b8247a9c7a4675019
Author: Thurston Dang <thurston at google.com>
Date: 2023-04-14 (Fri, 14 Apr 2023)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h
M compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cpp
M compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.h
M compiler-rt/test/msan/dtls_test.c
Log Message:
-----------
Fix tls_get_addr handling for glibc >=2.25
This changes the sanitizers' tls_get_addr handling from
a heuristic check of __signal_safe_memalign allocations
(which has only been used in a since deprecated version
of Google's runtime), to using the sanitizers' interface
function to check if it is a malloc allocation (used
since glibc >= 2.25).
This is one of the approaches proposed by Keno in
https://github.com/google/sanitizers/issues/1409#issuecomment-1214244142
This moves the weak annotation of __sanitizer_get_allocated_size/begin from the header to sanitizer_tls_get_addr.cpp, as suggested by Vitaly in D148060.
Reviewed By: vitalybuka
Differential Revision: https://reviews.llvm.org/D147459
More information about the All-commits
mailing list