This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] malloc: Add missing arena lock in mallinfo [BZ #22408]
- From: Siddhesh Poyarekar <siddhesh at gotplt dot org>
- To: DJ Delorie <dj at redhat dot com>
- Cc: fweimer at redhat dot com, libc-alpha at sourceware dot org
- Date: Wed, 15 Nov 2017 09:00:59 +0530
- Subject: Re: [PATCH] malloc: Add missing arena lock in mallinfo [BZ #22408]
- Authentication-results: sourceware.org; auth=none
- References: <xnk1ysxqi2.fsf@greed.delorie.com>
On Wednesday 15 November 2017 07:17 AM, DJ Delorie wrote:
> Siddhesh Poyarekar <siddhesh@gotplt.org> writes:
>> statistics reporting in malloc_info" since it does more than adding the
>> missing arena lock. That or split out the loop to iterate over heaps
>> into a separate patch since it is a logically distinct change from the
>> fix to BZ#22408, with a bz to track the fix. I prefer the latter approach.
>
> I don't see the benefit of splitting up the patch, as there would be no
> patch left - Florian's solution did not require any changes to the
> locks. Given no obvious change specific to the BZ, I think it's OK to
> use the existing patch to close the existing BZ as "fixed by other
> means".
I don't see how you came to that conclusion, there is a fix in there
that brings heap->size into the lock scope of ar_ptr->mutex. That is
one fix and the other fix is to then expand the heap traversal so that
all heaps are accounted for. Florian's follow-up patches have correctly
made that split.
They're two very different bugs and hence should have two different
patches to clearly indicate what changed.
Siddhesh