[compiler-rt] 32adf10 - [scudo] Add GWP-ASan state/metadata pointer proxies.
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 11 09:22:11 PDT 2021
Author: Mitch Phillips
Date: 2021-08-11T09:21:48-07:00
New Revision: 32adf108c8edd989caf9392131a5ebaf9de762f2
URL: https://github.com/llvm/llvm-project/commit/32adf108c8edd989caf9392131a5ebaf9de762f2
DIFF: https://github.com/llvm/llvm-project/commit/32adf108c8edd989caf9392131a5ebaf9de762f2.diff
LOG: [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
Added:
Modified:
compiler-rt/lib/scudo/standalone/combined.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/combined.h b/compiler-rt/lib/scudo/standalone/combined.h
index fd5360ce0f55a..922c2e50bb0b4 100644
--- a/compiler-rt/lib/scudo/standalone/combined.h
+++ b/compiler-rt/lib/scudo/standalone/combined.h
@@ -205,6 +205,16 @@ class Allocator {
#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);
}
More information about the llvm-commits
mailing list