https://github.com/vitalybuka created 
https://github.com/llvm/llvm-project/pull/108684

There is possibility of
static_tls_begin is set and static_tls_end is not yet

The test reproduces the case.
Stack trace looks like this:
   `MsanThread::Init`
   `SetThreadStackAndTls`
   `GetThreadStackAndTls`
   `GetThreadStackTopAndBottom`
   `pthread_getattr_np`
   `realloc`
   `__sanitizer_malloc_hook`
   TLS access
   `___interceptor___tls_get_addr`
   `DTLS_on_tls_get_addr`

The issue is that `SetThreadStackAndTls` implementation
stores `tls_begin` before `GetThreadStackTopAndBottom`,
and `tls_end` after. So we have partially initialized
state in `DTLS_on_tls_get_addr`.



_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to