From: Florian Weimer <fw@deneb.enyo.de>
To: liqingqing <liqingqing3@huawei.com>
Cc: Liusirui <liusirui@huawei.com>, <libc-alpha@sourceware.org>,
<carlos@redhat.com>, <siddhesh@gotplt.org>, <dj@redhat.com>,
<hushiyuan@huawei.com>
Subject: Re: [PATCH] malloc: fix compile error
Date: Wed, 30 Oct 2019 19:39:20 +0100 [thread overview]
Message-ID: <87v9s6krhj.fsf@mid.deneb.enyo.de> (raw)
In-Reply-To: <28dd045a-6937-1a6b-f069-d23209686faa@huawei.com> (liqingqing's message of "Wed, 30 Oct 2019 15:27:36 +0800")
* liqingqing:
> On 2019/10/30 14:36, Liusirui wrote:
>> Since e9c4fe93b3855239752819303ca377dff0ed0553, the commit changes struct
>> malloc_chunk member "size" to "mchunk_size". This cause a compile error
>> in function dump_heap, if macros MALLOC_DEBUG has defined and the value is
>> larger 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;
>>
>
> I think you can give more details about the error like the compile step.
> and so that the other guys may get more information.
The problem is that the accessor conversion was not extended to the
MALLOC_DEBUG conditional areas of the code. The commit message could
perhaps be worded a little bit clearer in this regard.
next prev parent reply other threads:[~2019-10-30 18:39 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-30 6:36 [PATCH] malloc: fix compile error Liusirui
2019-10-30 7:27 ` liqingqing
2019-10-30 11:40 ` Carlos O'Donell
2019-10-31 3:44 ` liqingqing
2019-11-01 7:47 ` liqingqing
2019-11-01 12:49 ` Carlos O'Donell
2019-10-30 18:39 ` Florian Weimer [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-01-13 12:08 liusirui
2020-01-13 12:13 ` liqingqing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/libc/involved.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87v9s6krhj.fsf@mid.deneb.enyo.de \
--to=fw@deneb.enyo.de \
--cc=carlos@redhat.com \
--cc=dj@redhat.com \
--cc=hushiyuan@huawei.com \
--cc=libc-alpha@sourceware.org \
--cc=liqingqing3@huawei.com \
--cc=liusirui@huawei.com \
--cc=siddhesh@gotplt.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).