On 26/07/18 22:34 +0200, Florian Weimer wrote:
Oh dear, this is worrying.
I'm adding more places in libstdc++ where the std::lib assumes that
memory obtained from malloc will always be aligned to
alignof(max_align_t). If somebody replaces malloc and it fails to meet
that requirement, undefined behaviour can happen (specifically, types
that require 16-byte alignment might not get it when placed in
containers like std::vector, leading to unaligned accesses).
Replacement mallocs really need to meet malloc's guarantees, not just
pick and choose what they care about. This is a very good reason why
we should be cautious about allowing applications to replace malloc in
Fedora.