This patch fixes calculating begin of TLS area. For example in pthread_setspecific function memory is allocated (calloc) and pointer on that memory is stored in TLS area, before this patch LSAN was skipping that part of TLS area (because begin of TLS area was not calculated correctly). Because of this memory leak was reported. I'm referencing on libc (# define THREAD_SELF \ ((struct pthread *)__builtin_thread_pointer () - 1)) in calculating begin of TLS area. This patch fixes make-check tests: TestCases/use_tls_pthread_specific_dynamic.cc, use_tls_pthread_specific_static.cc.
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
This looks good to me, with the caveat that I'm not an expert in this area. I've checked that descr_addr will match the glibc THREAD_SELF macro for AARCH64 so this looks sensible.