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 12:45 -0400, R P Herrold wrote:
On Thu, 26 Jul 2018, Florian Weimer wrote:

I would like to request a change of the Packaging Guidelines, advising
packagers not to interpose malloc.

The use here of 'interpose' is unclear to me -- are you saying
'substitute a different' ?

The usual way to replace 'malloc' is via ELF symbol interposition:
https://www.airs.com/blog/archives/307

This means some library provides a definition for the symbol 'malloc'
and that gets used instead of the 'malloc' in libc.so

Symbol interposition means the code continues to call 'malloc' and
'free' but those calls get redirected to different implementations.
The alternative is to explicitly use a different allocator with a
different API, e.g. calling 'foo_malloc' and 'foo_free' instead of
'malloc' and 'free'. The latter case doesn't hijack the symbol and
affect any other shared libraries which want to use malloc, because
those other calls will still use the malloc in libc.
_______________________________________________
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/3OEXAFLNKX76QV7UAGO2CQBL7F3J3VBZ/




[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