summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDyld.c
diff options
context:
space:
mode:
authornijtmans@users.sourceforge.net <jan.nijtmans>2011-03-22 10:10:05 (GMT)
committernijtmans@users.sourceforge.net <jan.nijtmans>2011-03-22 10:10:05 (GMT)
commit2c2f5655e138a09128eec384ebae2ba1c2a9ee29 (patch)
treefed1fb5e28145b501c3d3b462be3b590566e964a /unix/tclLoadDyld.c
parentd18949891591512847ad213be348f2c0e60fa317 (diff)
parent832787de466e0cbef8ff4600264f3779b56b8bb6 (diff)
downloadtcl-2c2f5655e138a09128eec384ebae2ba1c2a9ee29.zip
tcl-2c2f5655e138a09128eec384ebae2ba1c2a9ee29.tar.gz
tcl-2c2f5655e138a09128eec384ebae2ba1c2a9ee29.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 08d651c..0a36215 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -196,7 +196,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
@@ -206,7 +209,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");