summary refs log tree commit diff
path: root/manual
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-23 20:26:01 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2021-07-23 20:27:10 +0530
commitd34ed66f96fa9316654d7adb2afcce4be1d1c4f5 (patch)
treebfc2e55ae280c08bfa5a5990dd5cc1e2e4c071ce /manual
parent7c124e3714c38157230ed1a5d743b37defe64dc2 (diff)
downloadglibc-d34ed66f96fa9316654d7adb2afcce4be1d1c4f5.tar.gz
glibc-d34ed66f96fa9316654d7adb2afcce4be1d1c4f5.tar.xz
glibc-d34ed66f96fa9316654d7adb2afcce4be1d1c4f5.zip
manual: Document unsupported cases for interposition
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>
Diffstat (limited to 'manual')
-rw-r--r--manual/memory.texi7
1 files changed, 7 insertions, 0 deletions
diff --git a/manual/memory.texi b/manual/memory.texi
index 69c8894602..a51ed42516 100644
--- a/manual/memory.texi
+++ b/manual/memory.texi
@@ -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