public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] manual: Document unsupported cases for interposition
@ 2021-07-23 14:57 Siddhesh Poyarekar
  0 siblings, 0 replies; only message in thread
From: Siddhesh Poyarekar @ 2021-07-23 14:57 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d34ed66f96fa9316654d7adb2afcce4be1d1c4f5

commit d34ed66f96fa9316654d7adb2afcce4be1d1c4f5
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
Date:   Fri Jul 23 20:26:01 2021 +0530

    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>

Diff:
---
 manual/memory.texi | 7 +++++++
 1 file changed, 7 insertions(+)

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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-23 14:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 14:57 [glibc] manual: Document unsupported cases for interposition Siddhesh Poyarekar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).