From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from hamster.birch.relay.mailchannels.net (hamster.birch.relay.mailchannels.net [23.83.209.80]) by sourceware.org (Postfix) with ESMTPS id 603CA3990C37 for ; Wed, 28 Jul 2021 11:27:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 603CA3990C37 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 AB6725A0C1D; Wed, 28 Jul 2021 11:27:42 +0000 (UTC) Received: from pdx1-sub0-mail-a75.g.dreamhost.com (100-101-162-69.trex.outbound.svc.cluster.local [100.101.162.69]) (Authenticated sender: dreamhost) by relay.mailchannels.net (Postfix) with ESMTPA id 50C6B5A0DA1; Wed, 28 Jul 2021 11:27:42 +0000 (UTC) X-Sender-Id: dreamhost|x-authsender|siddhesh@gotplt.org Received: from pdx1-sub0-mail-a75.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); Wed, 28 Jul 2021 11:27:42 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: dreamhost|x-authsender|siddhesh@gotplt.org X-MailChannels-Auth-Id: dreamhost X-Supply-Arithmetic: 063fc7863021b1af_1627471662542_2831561805 X-MC-Loop-Signature: 1627471662542:2684414689 X-MC-Ingress-Time: 1627471662542 Received: from pdx1-sub0-mail-a75.g.dreamhost.com (localhost [127.0.0.1]) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTP id 1C9498C384; Wed, 28 Jul 2021 04:27:42 -0700 (PDT) Received: from [192.168.1.153] (unknown [1.186.101.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: siddhesh@gotplt.org) by pdx1-sub0-mail-a75.g.dreamhost.com (Postfix) with ESMTPSA id 4CEE18C383; Wed, 28 Jul 2021 04:27:39 -0700 (PDT) Subject: Re: [PATCH v2] xmalloc: Fix warnings with gcc analyzer To: Florian Weimer Cc: libc-alpha@sourceware.org References: <20210728103345.4065595-1-siddhesh@sourceware.org> <87sfzy8zcv.fsf@oldenburg.str.redhat.com> <6285ea15-68a1-38a0-712c-f47188275951@sourceware.org> <87o8am8yub.fsf@oldenburg.str.redhat.com> X-DH-BACKEND: pdx1-sub0-mail-a75 From: Siddhesh Poyarekar Message-ID: <16ac6a84-3425-0688-1718-cb35bffae001@sourceware.org> Date: Wed, 28 Jul 2021 16:57:34 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <87o8am8yub.fsf@oldenburg.str.redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3486.6 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_NONE, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, SPF_HELO_NONE, SPF_NEUTRAL, TXREP autolearn=no 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-List-Received-Date: Wed, 28 Jul 2021 11:27:45 -0000 On 7/28/21 4:55 PM, Florian Weimer wrote: > So it does not free anything ever? Specifically, it does not act as a substitute for free(); it does free during reallocation. > We should not have two different attributes for xrealloc. I suggest to > drop the attribute from the include/* version for now, until we can > clean this up. OK. Perhaps it would make sense to consolidate the two x* functions too later. I'll post v3. Siddhesh