[PATCH v4 1/2] malloc: Randomize the alignment of the thread heaps [BZ #22853]
Florian Weimer
fweimer@redhat.com
Tue Nov 10 20:37:41 GMT 2026
* Wilco Dijkstra:
> If we do this, it might be better to design a more general way to find
> the heap/arena (something on our wish list for a while). There are
> plenty bits free in the chunk header to store an index into an array
> of descriptors or (for 64-bit SIZE_SZ) the offset to the header. This
> is non-trivial, but it would remove all restrictions on heap placement
> and size (and even allow them to grow), plus get ASLR for free.
I have a patch for this. It seems generally a win because it avoids
cache aliasing for the heap_info structure from which the arena pointer
is loaded.
Thanks,
Florian
More information about the Libc-alpha
mailing list