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

Fabio D'Urso via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 30 14:01:59 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
----------------
fabio-d wrote:

My point is that I expect clients to build their mini-finite-state-machines to process realloc notifications. Having known and well-defined transitions would help maintaining them

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


More information about the llvm-commits mailing list