[PATCH] D90195: [GWP-ASan] Abstract the thread local variables access

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 26 14:54:48 PDT 2020


cryptoad created this revision.
cryptoad added reviewers: hctim, eugenis, mcgrathr.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
cryptoad requested review of this revision.

In a similar fashion to D87420 <https://reviews.llvm.org/D87420> for Scudo, this CL introduces a way to
get thread local variables via a platform-specific reserved TLS slot,
since Fuchsia doesn't support ELF TLS from the libc itself.

If needing to use this, a platform will have to define
`GWP_ASAN_HAS_PLATFORM_TLS_SLOT` and provide `gwp_asan_platform_tls_slot.h`
which will define a `uint64_t *getPlatformGwpAsanTlsSlot()` function
that will return the TLS word of storage.

I snuck in a couple of cleanup items as well, moving some static
functions to anonymous namespace for consistency.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90195

Files:
  compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
  compiler-rt/lib/gwp_asan/guarded_pool_allocator.h
  compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90195.300799.patch
Type: text/x-patch
Size: 7628 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201026/8e0dc07a/attachment.bin>


More information about the llvm-commits mailing list