changeset 3788:626d5f4a5afb

disable RTLD_DEEPBIND if loading plugins
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 20 Mar 2020 12:37:41 +0100
parents 7f4a75093a6a
children 3ba143353f95 59704c124722
files Core/SharedLibrary.cpp
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/Core/SharedLibrary.cpp	Thu Mar 19 10:23:29 2020 +0100
+++ b/Core/SharedLibrary.cpp	Fri Mar 20 12:37:41 2020 +0100
@@ -62,14 +62,19 @@
     }
 
 #elif defined(__linux__) || (defined(__APPLE__) && defined(__MACH__)) || defined(__FreeBSD_kernel__) || defined(__FreeBSD__) || defined(__OpenBSD__)
-
+   
     /**
      * "RTLD_LOCAL" is the default, and is only present to be
      * explicit. "RTLD_DEEPBIND" was added in Orthanc 1.6.0, in order
      * to avoid crashes while loading plugins from the LSB binaries of
      * the Orthanc core.
+     *
+     * BUT this had no effect, and this results in a crash if loading
+     * the Python 2.7 plugin => We disabled it again in Orthanc 1.6.1.
      **/
-#if defined(RTLD_DEEPBIND)  // This is a GNU extension
+    
+#if 0 // && defined(RTLD_DEEPBIND)  // This is a GNU extension
+    // Disabled in Orthanc 1.6.1
     handle_ = ::dlopen(path_.c_str(), RTLD_NOW | RTLD_LOCAL | RTLD_DEEPBIND);
 #else
     handle_ = ::dlopen(path_.c_str(), RTLD_NOW | RTLD_LOCAL);