Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alter glibc override to work with RTL_DEEPBIND #598

Merged
merged 1 commit into from
Feb 27, 2023

Conversation

mjp41
Copy link
Member

@mjp41 mjp41 commented Feb 27, 2023

When using dlopen with RTL_DEEPBIND the LD_PRELOAD used by the majority of allocators does not work as both libc and snmallocs allocators can be called by various dso.

This patch uses GLIBC's __malloc_hook to override the allocator as well as LD_PRELOAD. This means that all libraries will call snmalloc when performing allocation.

@mjp41
Copy link
Member Author

mjp41 commented Feb 27, 2023

Fixes #595.

@mjp41 mjp41 force-pushed the rtl_deepbind branch 2 times, most recently from ac4b28b to 0504be7 Compare February 27, 2023 11:32
When using dlopen with RTL_DEEPBIND the LD_PRELOAD used
by the majority of allocators does not work as both libc
and snmallocs allocators can be called by various dso.

This patch uses GLIBC's __malloc_hook to override the allocator
as well as LD_PRELOAD.  This means that all libraries will
call snmalloc when performing allocation.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants