From patchwork Sat Oct 26 07:09:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: l00420122 X-Patchwork-Id: 35355 Received: (qmail 120668 invoked by alias); 26 Oct 2019 07:09:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 120655 invoked by uid 89); 26 Oct 2019 07:09:38 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-22.0 required=5.0 tests=AWL, BAYES_00, FORGED_SPF_HELO, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: huawei.com From: liusirui To: CC: Subject: [PATCH v2] malloc: fix compile error, if sets macros MALLOC_DEBUG > 1 while compiling glibc Date: Sat, 26 Oct 2019 15:09:57 +0800 Message-ID: <1572073797-26659-1-git-send-email-liusirui@huawei.com> MIME-Version: 1.0 Since e9c4fe93b3855239752819303ca377dff0ed0553, the commit changes struct malloc_chunk member "size" to "mchunk_size". This cause a compile error in function dump_heap, with macros MALLOC_DEBUG > 1. --- malloc/arena.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/malloc/arena.c b/malloc/arena.c index 74815ac..be5c9f9 100644 --- a/malloc/arena.c +++ b/malloc/arena.c @@ -419,13 +419,13 @@ dump_heap (heap_info *heap) ~MALLOC_ALIGN_MASK); for (;; ) { - fprintf (stderr, "chunk %p size %10lx", p, (long) p->size); + fprintf (stderr, "chunk %p size %10lx", p, (long) chunksize_nomask(p)); if (p == top (heap->ar_ptr)) { fprintf (stderr, " (top)\n"); break; } - else if (p->size == (0 | PREV_INUSE)) + else if (chunksize_nomask(p) == (0 | PREV_INUSE)) { fprintf (stderr, " (fence)\n"); break;