manual: Document unsupported cases for interposition
authorSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 23 Jul 2021 14:56:01 +0000 (20:26 +0530)
committerSiddhesh Poyarekar <siddhesh@sourceware.org>
Fri, 23 Jul 2021 14:57:10 +0000 (20:27 +0530)
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.

Reviewed-by: Florian Weimer <fweimer@redhat.com>
manual/memory.texi

index 69c8894..a51ed42 100644 (file)
@@ -1864,6 +1864,13 @@ 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.
 
+There are other functions (@code{reallocarray}, @code{strdup}, etc.) in
+@theglibc{} that are not listed above but return newly allocated memory to
+callers.  Replacement of these functions is not supported and may produce
+incorrect results.  @Theglibc{} implementations of these functions call
+the replacement allocator functions whenever available, so they will work
+correctly with @code{malloc} replacement.
+
 @node Obstacks
 @subsection Obstacks
 @cindex obstacks