From patchwork Thu Jul 8 13:16:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1502256 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=Vss5A1Hx; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GLH0d1qrtz9sRf for ; Thu, 8 Jul 2021 23:18:09 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CAC69398B885 for ; Thu, 8 Jul 2021 13:18:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CAC69398B885 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625750286; bh=iIJ395Jx1ZqIeb9nKAXex9g1suUtNqiB/hmxyeTdxa4=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=Vss5A1HxPvhOYNWXTtzd+y9T+d/LvoGzZ+PWEdb15H9efkxYi2gRNWL7kvT29VIbc rGn6o9scuPrWKV/exKeWOYcBaTqylZvcXtpu3m30TQTTSKihGIQKK3QL1ze2D0ULD6 f/4TkjY2x7UAXnNIwjb7sbB4h6K8MyDb8/fmSKF8= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from purple.birch.relay.mailchannels.net (purple.birch.relay.mailchannels.net [23.83.209.150]) by sourceware.org (Postfix) with ESMTPS id 7A6A6398B87A for ; Thu, 8 Jul 2021 13:16:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7A6A6398B87A 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 D428621F3C for ; Thu, 8 Jul 2021 13:16:43 +0000 (UTC) Received: from pdx1-sub0-mail-a48.g.dreamhost.com (100-96-17-89.trex.outbound.svc.cluster.local [100.96.17.89]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 057F321EEC for ; Thu, 8 Jul 2021 13:16:43 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a48.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.17.89 (trex/6.3.3); Thu, 08 Jul 2021 13:16:43 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Plucky-Blushing: 7962cd405e67f33d_1625750203347_1878134245 X-MC-Loop-Signature: 1625750203347:748861729 X-MC-Ingress-Time: 1625750203347 Received: from pdx1-sub0-mail-a48.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a48.g.dreamhost.com (Postfix) with ESMTP id BA110856B9 for ; Thu, 8 Jul 2021 06:16: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-a48.g.dreamhost.com (Postfix) with ESMTPSA id AF032856AC for ; Thu, 8 Jul 2021 06:16:41 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a48 To: libc-alpha@sourceware.org Subject: [committed 1/2] Move mcheck symbol from stdlib to malloc Date: Thu, 8 Jul 2021 18:46:23 +0530 Message-Id: <20210708131624.2005357-2-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210708131624.2005357-1-siddhesh@sourceware.org> References: <20210708131624.2005357-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3494.3 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_H2, 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 Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" It is defined in malloc, so it belongs there. Verified on x86_64 that the built libraries are identical despite this change. --- malloc/Versions | 2 +- stdlib/Versions | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/malloc/Versions b/malloc/Versions index 62e4698a08..470a940666 100644 --- a/malloc/Versions +++ b/malloc/Versions @@ -26,7 +26,7 @@ libc { # m* mallinfo; malloc; malloc_get_state; malloc_set_state; malloc_stats; - malloc_trim; malloc_usable_size; mallopt; memalign; mprobe; mtrace; + malloc_trim; malloc_usable_size; mallopt; mcheck; memalign; mprobe; mtrace; muntrace; # o* diff --git a/stdlib/Versions b/stdlib/Versions index 9e665d4c26..5e9099a153 100644 --- a/stdlib/Versions +++ b/stdlib/Versions @@ -40,7 +40,7 @@ libc { # m* mblen; mbrlen; mbrtowc; mbsinit; mbsnrtowcs; mbsrtowcs; mbstowcs; - mbtowc; mcheck; mcount; mrand48; mrand48_r; + mbtowc; mcount; mrand48; mrand48_r; # n* nrand48; nrand48_r; From patchwork Thu Jul 8 13:16:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Siddhesh Poyarekar X-Patchwork-Id: 1502258 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=8.43.85.97; helo=sourceware.org; envelope-from=libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=usiK58hW; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4GLH1V1x5Cz9sRf for ; Thu, 8 Jul 2021 23:18:54 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A22F8398B864 for ; Thu, 8 Jul 2021 13:18:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A22F8398B864 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1625750331; bh=MhcXXZEvPHPBWFY1lSIHKHiZnWrxzF2aw+0QwbJ3Ils=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=usiK58hWRgUchynedH0sjqUW6upRRmGZtKEDDfRAK/lfJweeAXf0bNGyDR6Xxh6WP +mt6AkudlWN95i7XVYW1bVaxOnRnA/ksbWwPLiwuLyN35cq8zbV1ltti5sb0lFPH3v Gnxdf5gclnEN6upjTWYVyhL0Ow5dy8/W5a6DMR4o= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from camel.birch.relay.mailchannels.net (camel.birch.relay.mailchannels.net [23.83.209.29]) by sourceware.org (Postfix) with ESMTPS id 0A42E398B887 for ; Thu, 8 Jul 2021 13:16:46 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 0A42E398B887 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 461B2921DC2 for ; Thu, 8 Jul 2021 13:16:45 +0000 (UTC) Received: from pdx1-sub0-mail-a48.g.dreamhost.com (100-96-16-89.trex-nlb.outbound.svc.cluster.local [100.96.16.89]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id CCABB922666 for ; Thu, 8 Jul 2021 13:16:44 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a48.g.dreamhost.com (pop.dreamhost.com [64.90.62.162]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384) by 100.96.16.89 (trex/6.3.3); Thu, 08 Jul 2021 13:16:45 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Shelf-Abaft: 194c93dc59e4a378_1625750205058_1316726176 X-MC-Loop-Signature: 1625750205058:1937279206 X-MC-Ingress-Time: 1625750205058 Received: from pdx1-sub0-mail-a48.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a48.g.dreamhost.com (Postfix) with ESMTP id 8F488856B9 for ; Thu, 8 Jul 2021 06:16:44 -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-a48.g.dreamhost.com (Postfix) with ESMTPSA id A4A1B856AC for ; Thu, 8 Jul 2021 06:16:43 -0700 (PDT) X-DH-BACKEND: pdx1-sub0-mail-a48 To: libc-alpha@sourceware.org Subject: [committed 2/2] _int_realloc is static Date: Thu, 8 Jul 2021 18:46:24 +0530 Message-Id: <20210708131624.2005357-3-siddhesh@sourceware.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210708131624.2005357-1-siddhesh@sourceware.org> References: <20210708131624.2005357-1-siddhesh@sourceware.org> MIME-Version: 1.0 X-Spam-Status: No, score=-3494.3 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_H2, 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 Errors-To: libc-alpha-bounces+incoming=patchwork.ozlabs.org@sourceware.org Sender: "Libc-alpha" _int_realloc is correctly declared at the top to be static, but incorrectly defined without the static keyword. Fix that. The generated binaries have identical code. --- malloc/malloc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/malloc/malloc.c b/malloc/malloc.c index a3525f71da..0253453f27 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -4822,8 +4822,8 @@ static void malloc_consolidate(mstate av) ------------------------------ realloc ------------------------------ */ -void* -_int_realloc(mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize, +static void * +_int_realloc (mstate av, mchunkptr oldp, INTERNAL_SIZE_T oldsize, INTERNAL_SIZE_T nb) { mchunkptr newp; /* chunk to return */