Skip to content

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.
@mjp41 mjp41 merged commit 6066cba into microsoft:main Feb 27, 2023
@mjp41 mjp41 deleted the rtl_deepbind branch February 28, 2023 11:18
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