[PATCH] malloc: Add missing arena lock in mallinfo [BZ #22408]
Siddhesh Poyarekar
siddhesh@gotplt.org
Wed Nov 15 03:31:00 GMT 2017
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
More information about the Libc-alpha
mailing list