This is an automated email from the ASF dual-hosted git repository.
pengzheng pushed a commit to branch hotfix/double-dlclose
in repository https://gitbox.apache.org/repos/asf/celix.git
The following commit(s) were added to refs/heads/hotfix/double-dlclose by this
push:
new 8410db18 Fix crash when starting bundle containing unresolved symbols
#492.
8410db18 is described below
commit 8410db18dbd6d29ee4ff3e29aa4d6f7e8206afb0
Author: PengZheng <[email protected]>
AuthorDate: Fri Apr 28 10:53:36 2023 +0800
Fix crash when starting bundle containing unresolved symbols #492.
---
libs/framework/src/celix_libloader.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libs/framework/src/celix_libloader.c
b/libs/framework/src/celix_libloader.c
index 2d6514e3..94325aca 100644
--- a/libs/framework/src/celix_libloader.c
+++ b/libs/framework/src/celix_libloader.c
@@ -29,9 +29,9 @@ celix_library_handle_t*
celix_libloader_open(celix_bundle_context_t *ctx, const
#endif
celix_library_handle_t* handle = NULL;
bool noDelete = celix_bundleContext_getPropertyAsBool(ctx,
CELIX_LOAD_BUNDLES_WITH_NODELETE, defaultNoDelete);
- int flags = RTLD_LAZY|RTLD_LOCAL;
+ int flags = RTLD_NOW|RTLD_LOCAL;
if (noDelete) {
- flags = RTLD_LAZY|RTLD_LOCAL|RTLD_NODELETE;
+ flags = RTLD_NOW|RTLD_LOCAL|RTLD_NODELETE;
}
handle = dlopen(libPath, flags);