[PATCH v4] malloc: Improve malloc initialization
Florian Weimer
fweimer@redhat.com
Mon May 26 12:24:03 GMT 2025
* Wilco Dijkstra:
> Hi Florian,
>
>> Is it possible that this happened due to an unchecked allocation error?
>> That would be my best guess—we run out of virtual address space for this
>> workload because of unsuitable behavior of the non-sbrk allocator.
>
> How could it run out? It will do a 1MB mmap rather than many sbrk that
> increment by 1 page, so it uses at most 1MB extra VM.
Fragmentation?
> It would be interesting to force __always_fail_morecore in an older GLIBC
> and repeat the failing case.
It's related to addresses returned by malloc:
[MachO] Improve bounds check
<https://github.com/llvm/llvm-project/pull/141083>
So it was an LLVM bug, and it would be present with sbrk disabled on
older malloc versions.
This bug appears to be different, though:
malloc regression on i686
<https://sourceware.org/bugzilla/show_bug.cgi?id=32996>
It still reproduces with the __libc_initial problem fixed.
Thanks,
Florian
More information about the Libc-alpha
mailing list