Skip to content

Commit 32adf10

Browse files
committed
[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
1 parent be556d5 commit 32adf10

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

compiler-rt/lib/scudo/standalone/combined.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,16 @@ class Allocator {
205205
#endif // GWP_ASAN_HOOKS
206206
}
207207

208+
#ifdef GWP_ASAN_HOOKS
209+
const gwp_asan::AllocationMetadata *getGwpAsanAllocationMetadata() {
210+
return GuardedAlloc.getMetadataRegion();
211+
}
212+
213+
const gwp_asan::AllocatorState *getGwpAsanAllocatorState() {
214+
return GuardedAlloc.getAllocatorState();
215+
}
216+
#endif // GWP_ASAN_HOOKS
217+
208218
ALWAYS_INLINE void initThreadMaybe(bool MinimalInit = false) {
209219
TSDRegistry.initThreadMaybe(this, MinimalInit);
210220
}

0 commit comments

Comments
 (0)