From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2206) id 21BD1385501B; Fri, 23 Jul 2021 14:57:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 21BD1385501B Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Siddhesh Poyarekar To: glibc-cvs@sourceware.org Subject: [glibc] manual: Document unsupported cases for interposition X-Act-Checkin: glibc X-Git-Author: Siddhesh Poyarekar X-Git-Refname: refs/heads/master X-Git-Oldrev: 7c124e3714c38157230ed1a5d743b37defe64dc2 X-Git-Newrev: d34ed66f96fa9316654d7adb2afcce4be1d1c4f5 Message-Id: <20210723145730.21BD1385501B@sourceware.org> Date: Fri, 23 Jul 2021 14:57:30 +0000 (GMT) X-BeenThere: glibc-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2021 14:57:30 -0000 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d34ed66f96fa9316654d7adb2afcce4be1d1c4f5 commit d34ed66f96fa9316654d7adb2afcce4be1d1c4f5 Author: Siddhesh Poyarekar 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 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