summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDyld.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-22 10:14:00 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-22 10:14:00 (GMT)
commit30a811ccfbefb88b6677db80c9bf952e3c63f0d0 (patch)
treebd799accde5a0badd4053c8b583bc496ce792682 /unix/tclLoadDyld.c
parenta5177ffb5dd447e70609635c7472f0eeb7f88fde (diff)
parentb9f74bb43e5903dbe3fadd8c4d382c1724ee883f (diff)
downloadtcl-30a811ccfbefb88b6677db80c9bf952e3c63f0d0.zip
tcl-30a811ccfbefb88b6677db80c9bf952e3c63f0d0.tar.gz
tcl-30a811ccfbefb88b6677db80c9bf952e3c63f0d0.tar.bz2
[Bug #3216070] Loading extension libraries from embedded Tcl applications.
Diffstat (limited to 'unix/tclLoadDyld.c')
-rw-r--r--unix/tclLoadDyld.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 4fa1954..3fba3a5 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -207,7 +207,10 @@ TclpDlopen(
if (tclMacOSXDarwinRelease >= 8)
#endif
{
- dlHandle = dlopen(nativePath, RTLD_NOW | RTLD_GLOBAL);
+ /*
+ * Use (RTLD_NOW|RTLD_LOCAL) always, see [Bug #3216070]
+ */
+ dlHandle = dlopen(nativePath, RTLD_NOW | RTLD_LOCAL);
if (!dlHandle) {
/*
* Let the OS loader examine the binary search path for whatever
@@ -217,7 +220,10 @@ TclpDlopen(
fileName = Tcl_GetString(pathPtr);
nativeFileName = Tcl_UtfToExternalDString(NULL, fileName, -1, &ds);
- dlHandle = dlopen(nativeFileName, RTLD_NOW | RTLD_GLOBAL);
+ /*
+ * Use (RTLD_NOW|RTLD_LOCAL) always, see [Bug #3216070]
+ */
+ dlHandle = dlopen(nativeFileName, RTLD_NOW | RTLD_LOCAL);
}
if (dlHandle) {
TclLoadDbgMsg("dlopen() successful");