From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rhel8.vm.delorie.com (d-159-250-13-23.nh.cpe.atlanticbb.net [159.250.13.23]) by sourceware.org (Postfix) with ESMTPS id 080F73874C33 for ; Fri, 5 Mar 2021 18:42:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 080F73874C33 Received: from rhel8.vm.redhat.com (localhost [127.0.0.1]) by rhel8.vm.delorie.com (8.15.2/8.15.2) with ESMTPS id 125IgThE048582 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Fri, 5 Mar 2021 13:42:30 -0500 From: DJ Delorie To: Szabolcs Nagy Cc: libc-alpha@sourceware.org, Richard.Earnshaw@arm.com Subject: Re: [PATCH 01/16] malloc: Fix a realloc crash with heap tagging [BZ 27468] In-Reply-To: <20210305120133.GQ12795@arm.com> (message from Szabolcs Nagy on Fri, 5 Mar 2021 12:01:34 +0000) Date: Fri, 05 Mar 2021 13:42:29 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-6.3 required=5.0 tests=BAYES_00, KAM_DMARC_NONE, KAM_DMARC_STATUS, KHOP_HELO_FCRDNS, RDNS_DYNAMIC, SPF_FAIL, SPF_HELO_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Fri, 05 Mar 2021 18:42:34 -0000 Szabolcs Nagy writes: > with tagging on aarch64 (granule = 2*size_t) this does not include > the prev_ptr word at the end. So chunksize() includes the overhead to align tagging, but CHUNK_USER_SIZE() would not? It's unfortunate that we have such a good name for the chunk, but no good name for "that portion of the chunk that the application can use". USER_SIZE vs rawmem vs mem vs whatever. > I can refactor the code using this macro, or let me know if you have a > different preference (and if it should be backported with this bug fix > or have it as a follow up change on master). An agreement to fix it later is sufficient, let's not mess up the existing patch set.