[compiler-rt] [scudo] Add hooks to mark the range of realloc (PR #73883)

via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 29 19:46:45 PST 2023


================
@@ -17,10 +17,15 @@ extern "C" {
 __attribute__((weak)) const char *__scudo_default_options(void);
 
 // Post-allocation & pre-deallocation hooks.
-// They must be thread-safe and not use heap related functions.
 __attribute__((weak)) void __scudo_allocate_hook(void *ptr, size_t size);
 __attribute__((weak)) void __scudo_deallocate_hook(void *ptr);
 
+// These hooks are used to mark the scope of doing realloc(). Note that the
+// allocation/deallocation are still reported through the hooks above, this is
+// only used when you want to group two operations in the realloc().
----------------
ChiaHungDuan wrote:

Good idea. Done

https://github.com/llvm/llvm-project/pull/73883


More information about the llvm-commits mailing list