unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] manual: reallocarray and str*dup interposition is not supported
@ 2021-07-20  1:43 Siddhesh Poyarekar via Libc-alpha
  2021-07-20  8:05 ` Florian Weimer via Libc-alpha
  0 siblings, 1 reply; 6+ messages in thread
From: Siddhesh Poyarekar via Libc-alpha @ 2021-07-20  1:43 UTC (permalink / raw)
  To: libc-alpha; +Cc: fweimer

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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-07-23 11:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-20  1:43 [PATCH] manual: reallocarray and str*dup interposition is not supported Siddhesh Poyarekar via Libc-alpha
2021-07-20  8:05 ` Florian Weimer via Libc-alpha
2021-07-21  7:18   ` [PATCH v2] manual: Document unsupported cases for interposition Siddhesh Poyarekar via Libc-alpha
2021-07-21  7:47     ` Andreas Schwab
2021-07-21  8:04       ` [PATCH v3] " Siddhesh Poyarekar via Libc-alpha
2021-07-23 11:43         ` Florian Weimer via Libc-alpha

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).