[Lldb-commits] [lldb] r151936 - /lldb/trunk/source/Expression/RecordingMemoryManager.cpp
Sean Callanan
scallanan at apple.com
Fri Mar 2 12:59:34 PST 2012
Author: spyffe
Date: Fri Mar 2 14:59:34 2012
New Revision: 151936
URL: http://llvm.org/viewvc/llvm-project?rev=151936&view=rev
Log:
Prevent assertions because of zero-sized sections,
while still ensuring that the sections get remote
allocations.
Modified:
lldb/trunk/source/Expression/RecordingMemoryManager.cpp
Modified: lldb/trunk/source/Expression/RecordingMemoryManager.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/RecordingMemoryManager.cpp?rev=151936&r1=151935&r2=151936&view=diff
==============================================================================
--- lldb/trunk/source/Expression/RecordingMemoryManager.cpp (original)
+++ lldb/trunk/source/Expression/RecordingMemoryManager.cpp Fri Mar 2 14:59:34 2012
@@ -238,8 +238,13 @@
lldb_private::Error err;
+ size_t allocation_size = ai->m_size + ai->m_alignment - 1;
+
+ if (allocation_size == 0)
+ allocation_size = 1;
+
ai->m_remote_allocation = process.AllocateMemory(
- ai->m_size + ai->m_alignment - 1,
+ allocation_size,
ai->m_executable ? (lldb::ePermissionsReadable | lldb::ePermissionsExecutable)
: (lldb::ePermissionsReadable | lldb::ePermissionsWritable),
err);
More information about the lldb-commits
mailing list