[llvm-commits] [llvm] r84859 - /llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
Nicolas Geoffray
nicolas.geoffray at lip6.fr
Thu Oct 22 07:35:57 PDT 2009
Author: geoffray
Date: Thu Oct 22 09:35:57 2009
New Revision: 84859
URL: http://llvm.org/viewvc/llvm-project?rev=84859&view=rev
Log:
Verify that the function and exception table have been allocated
before freeing them.
Modified:
llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
Modified: llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp?rev=84859&r1=84858&r2=84859&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/JIT/JITMemoryManager.cpp Thu Oct 22 09:35:57 2009
@@ -490,13 +490,13 @@
/// deallocateFunctionBody - Deallocate all memory for the specified
/// function body.
void deallocateFunctionBody(void *Body) {
- deallocateBlock(Body);
+ if (Body) deallocateBlock(Body);
}
/// deallocateExceptionTable - Deallocate memory for the specified
/// exception table.
void deallocateExceptionTable(void *ET) {
- deallocateBlock(ET);
+ if (ET) deallocateBlock(ET);
}
/// setMemoryWritable - When code generation is in progress,
More information about the llvm-commits
mailing list