[scudo] Add GWP-ASan state/metadata pointer proxies.

Provide accessor proxies for the gwp-asan regions that are useful in
symbolizing dumps offline. Should be useful for Fuchsia to be able to
locate these internal pointers to stash the data in a minidump.

Reviewed By: cryptoad

Differential Revision: https://reviews.llvm.org/D107909
This commit is contained in:
Mitch Phillips 2021-08-11 09:21:28 -07:00
parent be556d5131
commit 32adf108c8
1 changed files with 10 additions and 0 deletions

View File

@ -205,6 +205,16 @@ public:
#endif // GWP_ASAN_HOOKS
}
#ifdef GWP_ASAN_HOOKS
const gwp_asan::AllocationMetadata *getGwpAsanAllocationMetadata() {
return GuardedAlloc.getMetadataRegion();
}
const gwp_asan::AllocatorState *getGwpAsanAllocatorState() {
return GuardedAlloc.getAllocatorState();
}
#endif // GWP_ASAN_HOOKS
ALWAYS_INLINE void initThreadMaybe(bool MinimalInit = false) {
TSDRegistry.initThreadMaybe(this, MinimalInit);
}