[llvm-commits] CVS: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu May 11 17:03:25 PDT 2006
Changes in directory llvm/lib/ExecutionEngine/JIT:
JITEmitter.cpp updated: 1.99 -> 1.100
---
Log message:
For extra sanity checking, fill free'd memory with garbage so we know that
people aren't reusing machine code buffers at all.
---
Diffs of the changes: (+3 -0)
JITEmitter.cpp | 3 +++
1 files changed, 3 insertions(+)
Index: llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp
diff -u llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.99 llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.100
--- llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp:1.99 Thu May 11 18:56:57 2006
+++ llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp Thu May 11 19:03:12 2006
@@ -321,6 +321,9 @@
MemoryRangeHeader *MemRange = I->second;
assert(MemRange->ThisAllocated && "Block isn't allocated!");
+ // Fill the buffer with garbage!
+ DEBUG(memset(MemRange+1, 0xCD, MemRange->BlockSize-sizeof(*MemRange)));
+
// Free the memory.
FreeMemoryList = MemRange->FreeBlock(FreeMemoryList);
More information about the llvm-commits
mailing list