On 26/07/18 22:34 +0200, Florian Weimer wrote:
http://www.erahm.org/2016/03/24/minimum-alignment-of-allocation-across-platforms/

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.
_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
Fedora Code of Conduct: https://getfedora.org/code-of-conduct.html
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/IQQY5ZC7VIXUF544JBTILERCTJMETFHC/

Reply via email to