From patchwork Tue Jul 20 01:43:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 44429 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C8F91397283C for ; Tue, 20 Jul 2021 01:44:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8F91397283C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1626745445; bh=3zBCygm3TAO0MxHKi/cAaNqNSyoySD1h8Lj3d737VSc=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=rnwdBqfHLtoz7qnQjGw4CUO3j/3qz31imeq3xV41zYCxZ1D86t/IxDN14/bz5tYjS 8L1TySm5SFFs4AjPGQYKKor8n17T7ik7RVkf3Y5GUXL680h7rXhka9uDaVprxtwxwx FHVoD7NI11qEzm/rcQQ4QnivTTVi7hU4260EgQO4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from bird.elm.relay.mailchannels.net (bird.elm.relay.mailchannels.net [23.83.212.17]) by sourceware.org (Postfix) with ESMTPS id 3FE8A3857817 for ; Tue, 20 Jul 2021 01:43:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3FE8A3857817 X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 1ACDC322A21; Tue, 20 Jul 2021 01:43:43 +0000 (UTC) Received: from pdx1-sub0-mail-a31.g.dreamhost.com (100-101-162-69.trex-nlb.outbound.svc.cluster.local [100.101.162.69]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 4A620322A28; Tue, 20 Jul 2021 01:43:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a31.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.101.162.69 (trex/6.3.3); Tue, 20 Jul 2021 01:43:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Macabre-Arch: 373790ea1719c10b_1626745422622_1104772358 X-MC-Loop-Signature: 1626745422622:1244666366 X-MC-Ingress-Time: 1626745422622 Received: from pdx1-sub0-mail-a31.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTP id 12226852E2; Mon, 19 Jul 2021 18:43:42 -0700 (PDT) Received: from rhbox.intra.reserved-bit.com (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a31.g.dreamhost.com (Postfix) with ESMTPSA id 1A099852E0; Mon, 19 Jul 2021 18:43:39 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a31 To: libc-alpha@sourceware.org Subject: [PATCH] manual: reallocarray and str*dup interposition is not supported Date: Tue, 20 Jul 2021 07:13:29 +0530 Message-Id: <20210720014329.1251125-1-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Spam-Status: No, score=-3494.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Siddhesh Poyarekar via Libc-alpha From: Siddhesh Poyarekar Reply-To: Siddhesh Poyarekar Cc: fweimer@redhat.com Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" 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