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
Loading
Please sign in to comment