From: Jim Grosbach Date: Wed, 23 Mar 2011 21:35:02 +0000 (+0000) Subject: Fix double-free of Module. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=66978bd81c8f3dc87ced049e2577b98a399d72bc;p=oota-llvm.git Fix double-free of Module. The ExecutionEngine constructor already added the module, so there's no need to call addModule() directly. Doing so causes a double-free of the Module at program termination. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128171 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/lib/ExecutionEngine/MCJIT/MCJIT.cpp index faed7a6ae45..f3e60876684 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/lib/ExecutionEngine/MCJIT/MCJIT.cpp @@ -78,7 +78,6 @@ MCJIT::MCJIT(Module *m, TargetMachine *tm, TargetJITInfo &tji, } // Initialize passes. - ExecutionEngine::addModule(M); // FIXME: When we support multiple modules, we'll want to move the code // gen and finalization out of the constructor here and do it more // on-demand as part of getPointerToFunction().