"platforms/cuda/vscode:/vscode.git/clone" did not exist on "dbea5152504e55315a3deaeded275e4a442a183e"
Unverified Commit d169badc authored by peastman's avatar peastman Committed by GitHub
Browse files

Merge pull request #2587 from tristanic/rtld_local

Switched dlopen flag from RTLD_GLOBAL to RTLD_LOCAL
parents a9223eea cbdb2736
...@@ -222,7 +222,7 @@ static void* loadOneLibrary(const string& file) { ...@@ -222,7 +222,7 @@ static void* loadOneLibrary(const string& file) {
#ifdef __PNACL__ #ifdef __PNACL__
throw OpenMMException("Loading dynamic libraries is not supported on PNaCl"); throw OpenMMException("Loading dynamic libraries is not supported on PNaCl");
#else #else
void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_GLOBAL); void *handle = dlopen(file.c_str(), RTLD_LAZY | RTLD_LOCAL);
if (handle == NULL) { if (handle == NULL) {
throw OpenMMException("Error loading library "+file+": "+dlerror()); throw OpenMMException("Error loading library "+file+": "+dlerror());
} }
...@@ -357,4 +357,3 @@ ContextImpl& Platform::getContextImpl(Context& context) const { ...@@ -357,4 +357,3 @@ ContextImpl& Platform::getContextImpl(Context& context) const {
const ContextImpl& Platform::getContextImpl(const Context& context) const { const ContextImpl& Platform::getContextImpl(const Context& context) const {
return *context.impl; return *context.impl;
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment