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

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 12:26:54 PST 2023


================
@@ -17,10 +17,16 @@ 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
----------------
ChiaHungDuan wrote:

I think the hook names are self-explained. Every hooks called in between begin/end indicate they are called during `realloc`.  I'm not sure those comments will make it more clear

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


More information about the llvm-commits mailing list