unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@redhat.com>
To: liqingqing <liqingqing3@huawei.com>,
	Liusirui <liusirui@huawei.com>,
	libc-alpha@sourceware.org
Cc: siddhesh@gotplt.org, dj@redhat.com, hushiyuan@huawei.com
Subject: Re: [PATCH] malloc: fix compile error
Date: Wed, 30 Oct 2019 07:40:18 -0400	[thread overview]
Message-ID: <3219b097-425f-de7f-579a-ef10e9dee8e1@redhat.com> (raw)
In-Reply-To: <28dd045a-6937-1a6b-f069-d23209686faa@huawei.com>


On 10/30/19 3:27 AM, liqingqing wrote:
> 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.
> 

Agreed. The commit message should say which error and which compiler
version generated the error.

We still can't accept patches from Huawei yet because copyright assignment
has not been completed. But thanks for the review!

-- 
Cheers,
Carlos.

  reply	other threads:[~2019-10-30 11:40 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 [this message]
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
  -- 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=3219b097-425f-de7f-579a-ef10e9dee8e1@redhat.com \
    --to=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).