diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-12 00:03:12 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-12 00:03:12 +0000 |
commit | a5f0419b4e7415a579e08f918194b37537cd0e29 (patch) | |
tree | 692ef24c55df4d40aeaa7a3a8e230ac324542fcc /lib/ExecutionEngine | |
parent | 9f3d1ba9ad6bfdd4c0d89d42f8205284156d9940 (diff) | |
download | external_llvm-a5f0419b4e7415a579e08f918194b37537cd0e29.zip external_llvm-a5f0419b4e7415a579e08f918194b37537cd0e29.tar.gz external_llvm-a5f0419b4e7415a579e08f918194b37537cd0e29.tar.bz2 |
For extra sanity checking, fill free'd memory with garbage so we know that
people aren't reusing machine code buffers at all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28228 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine')
-rw-r--r-- | lib/ExecutionEngine/JIT/JITEmitter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ExecutionEngine/JIT/JITEmitter.cpp b/lib/ExecutionEngine/JIT/JITEmitter.cpp index efc2062..2a62bd3 100644 --- a/lib/ExecutionEngine/JIT/JITEmitter.cpp +++ b/lib/ExecutionEngine/JIT/JITEmitter.cpp @@ -321,6 +321,9 @@ namespace { 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); |