mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
Fix a bug where the DWARF emitter in the JIT was not initializing alignment
bytes. libgcc doesn't seem to mind, but if you pass this DWARF to GDB, it doesn't like it. Also make the JIT memory manager to initialize it's memory to garbage in debug mode, so that it's easier to find bugs like these in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79674 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -650,6 +650,10 @@ sys::MemoryBlock DefaultJITMemoryManager::allocateNewSlab(size_t size) {
|
||||
}
|
||||
LastSlab = B;
|
||||
++NumSlabs;
|
||||
// Initialize the slab to garbage when debugging.
|
||||
if (PoisonMemory) {
|
||||
memset(B.base(), 0xCD, B.size());
|
||||
}
|
||||
return B;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user