From 0ce8c560872bbd494ae09b97a787f647cf86f041 Mon Sep 17 00:00:00 2001 From: Waqar Ahmed Khan Date: Wed, 25 Oct 2023 16:21:07 -0500 Subject: [PATCH] Fix loading of libnuma.so (#1068) --- source/common.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/source/common.c b/source/common.c index 9a6f56cf4..f734c16e6 100644 --- a/source/common.c +++ b/source/common.c @@ -323,15 +323,15 @@ void aws_common_library_init(struct aws_allocator *allocator) { assumptions due to the way loaders and dlload are often implemented and those symbols are defined by things like libpthread.so on some unix distros. Sorry about the memory usage here, but it's our only safe choice. Also, please don't do numa configurations if memory is your economic bottleneck. */ - g_libnuma_handle = dlopen("libnuma.so", RTLD_LOCAL); + g_libnuma_handle = dlopen("libnuma.so", RTLD_LAZY | RTLD_LOCAL); /* turns out so versioning is really inconsistent these days */ if (!g_libnuma_handle) { - g_libnuma_handle = dlopen("libnuma.so.1", RTLD_LOCAL); + g_libnuma_handle = dlopen("libnuma.so.1", RTLD_LAZY | RTLD_LOCAL); } if (!g_libnuma_handle) { - g_libnuma_handle = dlopen("libnuma.so.2", RTLD_LOCAL); + g_libnuma_handle = dlopen("libnuma.so.2", RTLD_LAZY | RTLD_LOCAL); } if (g_libnuma_handle) {