From 98775c43583e4f6ee506edaff44312f9aac765a2 Mon Sep 17 00:00:00 2001 From: Jim Grosbach Date: Wed, 23 Mar 2011 21:35:02 +0000 Subject: [PATCH] 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. llvm-svn: 128171 --- llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp b/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp index faed7a6ae45b..f3e608766846 100644 --- a/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp +++ b/llvm/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().