[PATCH] manual: reallocarray and str*dup interposition is not supported

Siddhesh Poyarekar siddhesh@sourceware.org
Tue Jul 20 01:43:29 GMT 2021


These functions call the core allocator functions (realloc and malloc
respectively) and are hence guaranteed to allocate memory using the
correct functions when multiple allocators are interposed.  Having
these functions interposed in one allocator and not another may result
in confusion, hence discourage interposing them altogether.
---
 manual/memory.texi | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/manual/memory.texi b/manual/memory.texi
index 31ee36be8c..4560781f64 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -2033,6 +2033,11 @@ when a replacement @code{malloc} is in use.  However, failure to replace
 these functions typically does not result in crashes or other incorrect
 application behavior, but may result in static linking failures.
 
+Replacing the @code{reallocarray} function and the @code{strdup} family of
+functions is not supported and may produce incorrect results. @theglibc{}
+implementations of these functions call the replacement @code{malloc} and
+@code{realloc} functions whenever available.
+
 @node Obstacks
 @subsection Obstacks
 @cindex obstacks
-- 
2.31.1



More information about the Libc-alpha mailing list