[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.95+dfsg-1-6156-g094ec9b

Török Edvin edwin at clamav.net
Sun Apr 4 01:12:58 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit 0b337a2483f36a9daca6474f6c6368da84780b2d
Author: Török Edvin <edwin at clamav.net>
Date:   Wed Dec 16 15:07:39 2009 +0200

    Disable dlopen in LLVM, we don't use it.

diff --git a/libclamav/c++/llvm/lib/ExecutionEngine/ExecutionEngine.cpp b/libclamav/c++/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
index cb30748..e823647 100644
--- a/libclamav/c++/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
+++ b/libclamav/c++/llvm/lib/ExecutionEngine/ExecutionEngine.cpp
@@ -423,8 +423,9 @@ EngineBuilder::EngineBuilder(Module *m) : MP(new ExistingModuleProvider(m)) {
 ExecutionEngine *EngineBuilder::create() {
   // Make sure we can resolve symbols in the program as well. The zero arg
   // to the function tells DynamicLibrary to load the program, not a library.
-  if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr))
-    return 0;
+/* CLAMAV LOCAL: allow for no dlopen */
+//  if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr))
+//    return 0;
 
   // If the user specified a memory manager but didn't specify which engine to
   // create, we assume they only want the JIT, and we fail if they only want
diff --git a/libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp b/libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp
index 26afa54..52cac86 100644
--- a/libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp
+++ b/libclamav/c++/llvm/lib/ExecutionEngine/JIT/JIT.cpp
@@ -211,8 +211,9 @@ ExecutionEngine *JIT::createJIT(ModuleProvider *MP,
                                 CodeModel::Model CMM) {
   // Make sure we can resolve symbols in the program as well. The zero arg
   // to the function tells DynamicLibrary to load the program, not a library.
-  if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr))
-    return 0;
+/* CLAMAV LOCAL: no dlopen */
+//  if (sys::DynamicLibrary::LoadLibraryPermanently(0, ErrorStr))
+//   return 0;
 
   // Pick a target either via -march or by guessing the native arch.
   TargetMachine *TM = JIT::selectTarget(MP, ErrorStr);
diff --git a/libclamav/c++/llvm/lib/System/DynamicLibrary.cpp b/libclamav/c++/llvm/lib/System/DynamicLibrary.cpp
index 7eb9f5f..f658aea 100644
--- a/libclamav/c++/llvm/lib/System/DynamicLibrary.cpp
+++ b/libclamav/c++/llvm/lib/System/DynamicLibrary.cpp
@@ -44,6 +44,17 @@ void llvm::sys::DynamicLibrary::AddSymbol(const char* symbolName,
 
 #else
 
+#if 1
+/* CLAMAV LOCAL: no plugins */
+bool llvm::sys::DynamicLibrary::LoadLibraryPermanently(const char *Filename,
+                                            std::string *ErrMsg) {
+    if (ErrMsg) *ErrMsg = "dlopen disabled";
+    return true;
+}
+void* llvm::sys::DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
+    return 0;
+}
+#else
 #include <dlfcn.h>
 using namespace llvm;
 using namespace llvm::sys;
@@ -55,7 +66,6 @@ using namespace llvm::sys;
 
 static std::vector<void *> *OpenedHandles = 0;
 
-
 bool DynamicLibrary::LoadLibraryPermanently(const char *Filename,
                                             std::string *ErrMsg) {
   void *H = dlopen(Filename, RTLD_LAZY|RTLD_GLOBAL);
@@ -161,5 +171,5 @@ void* DynamicLibrary::SearchForAddressOfSymbol(const char* symbolName) {
 
   return 0;
 }
-
 #endif // LLVM_ON_WIN32
+#endif

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list