HomePhabricator

[GWP-ASan] Abstract the thread local variables access

Authored by cryptoad on Oct 26 2020, 2:54 PM.

Description

[GWP-ASan] Abstract the thread local variables access

In a similar fashion to 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.

Differential Revision: https://reviews.llvm.org/D90195

Details

Committed
cryptoadOct 28 2020, 3:06 PM
Differential Revision
D90195: [GWP-ASan] Abstract the thread local variables access
Parents
rG5b91a6a88bd6: [AMDGPU] Allow some modifiers on VOP3B instructions
Branches
Unknown
Tags
Unknown