[PATCH] D55596: Reimplement Thread Static Data ASan routines with TLS

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 09:53:17 PDT 2019


arichardson added a comment.

In D55596#1599456 <https://reviews.llvm.org/D55596#1599456>, @dim wrote:

> In D55596#1599244 <https://reviews.llvm.org/D55596#1599244>, @arichardson wrote:
>
> > This broke ASAN on FreeBSD (same for the MSAN change). When loading `static thread_local struct tsd_key key` this is done using `__tls_get_addr`. The interceptor for `__tls_get_addr` then calls `GetCurrentThread` which calls `AsanTSDGet` which again calls `__tls_get_addr`.
> >  If I remove the `|| SANITIZER_FREEBSD` it works fine (at least on FreeBSD 11.2).
>
>
> Yes indeed, this is https://bugs.llvm.org/show_bug.cgi?id=40761.  I'm unsure what a good solution direction is.


I just spent some time debugging and it seems like https://reviews.llvm.org/D55596 works.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55596/new/

https://reviews.llvm.org/D55596





More information about the llvm-commits mailing list