[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:23:51 UTC 2010


The following commit has been merged in the debian/unstable branch:
commit e2752b2cc8c8177863fe7e4b8082d7de9b84000c
Author: Török Edvin <edwin at clamav.net>
Date:   Mon Mar 22 13:05:20 2010 +0200

    Fix valgrind warning.

diff --git a/libclamav/c++/bytecode2llvm.cpp b/libclamav/c++/bytecode2llvm.cpp
index a30eeff..588c124 100644
--- a/libclamav/c++/bytecode2llvm.cpp
+++ b/libclamav/c++/bytecode2llvm.cpp
@@ -96,6 +96,7 @@ using namespace llvm;
 typedef DenseMap<const struct cli_bc_func*, void*> FunctionMapTy;
 struct cli_bcengine {
     ExecutionEngine *EE;
+    JITEventListener *Listener;
     LLVMContext Context;
     FunctionMapTy compiledFunctions;
     union {
@@ -1378,8 +1379,8 @@ int cli_bytecode_prepare_jit(struct cli_all_bc *bcs)
 		errs() << MODULE << "JIT not registered?\n";
 	    return CL_EBYTECODE;
 	}
-
-	EE->RegisterJITEventListener(new NotifyListener());
+	bcs->engine->Listener  = new NotifyListener();
+	EE->RegisterJITEventListener(bcs->engine->Listener);
 //	EE->RegisterJITEventListener(createOProfileJITEventListener());
 	// Due to LLVM PR4816 only X86 supports non-lazy compilation, disable
 	// for now.
@@ -1585,8 +1586,11 @@ int cli_bytecode_done_jit(struct cli_all_bc *bcs)
 {
     LLVMApiScopedLock scopedLock;
     if (bcs->engine) {
-	if (bcs->engine->EE)
+	if (bcs->engine->EE) {
+	    bcs->engine->EE->UnregisterJITEventListener(bcs->engine->Listener);
 	    delete bcs->engine->EE;
+	}
+	delete bcs->engine->Listener;
 	delete bcs->engine;
 	bcs->engine = 0;
     }

-- 
Debian repository for ClamAV



More information about the Pkg-clamav-commits mailing list