unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Siddhesh Poyarekar via Libc-alpha <libc-alpha@sourceware.org>
To: libc-alpha@sourceware.org
Cc: fweimer@redhat.com
Subject: [PATCH] manual: reallocarray and str*dup interposition is not supported
Date: Tue, 20 Jul 2021 07:13:29 +0530	[thread overview]
Message-ID: <20210720014329.1251125-1-siddhesh@sourceware.org> (raw)

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


             reply	other threads:[~2021-07-20  1:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-20  1:43 Siddhesh Poyarekar via Libc-alpha [this message]
2021-07-20  8:05 ` [PATCH] manual: reallocarray and str*dup interposition is not supported 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210720014329.1251125-1-siddhesh@sourceware.org \
    --to=libc-alpha@sourceware.org \
    --cc=fweimer@redhat.com \
    --cc=siddhesh@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).