Re: Guideline change: glibc malloc as the C/C++/Rust allocator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
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@xxxxxxxxxxxxxxxxxxxxxxx/message/IQQY5ZC7VIXUF544JBTILERCTJMETFHC/




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux