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

Christopher Ferris via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 7 12:37:42 PST 2023


================
@@ -20,6 +20,20 @@ __attribute__((weak)) const char *__scudo_default_options(void);
 __attribute__((weak)) void __scudo_allocate_hook(void *ptr, size_t size);
 __attribute__((weak)) void __scudo_deallocate_hook(void *ptr);
 
+// `realloc` involves both deallocation and allocation but they are not reported
+// atomically. In one specific case which may keep taking a snapshot right in
+// the middle of `realloc` reporting the deallocation and allocation, it may
+// confuse the user by the missing memory from `realloc`. To alleviate that
----------------
cferris1000 wrote:

by the missing -> by missing

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


More information about the llvm-commits mailing list