From bc4abcb2cb3701d591a741b9c61489e99903eab3 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Fri, 2 Mar 2012 21:34:28 +0000 Subject: [PATCH] For Sean: handle the case where you are asked for a 0 byte allocation with 0 alignment. llvm-svn: 151940 --- lldb/source/Expression/RecordingMemoryManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lldb/source/Expression/RecordingMemoryManager.cpp b/lldb/source/Expression/RecordingMemoryManager.cpp index 9ff86f61df16..b7b875f52160 100644 --- a/lldb/source/Expression/RecordingMemoryManager.cpp +++ b/lldb/source/Expression/RecordingMemoryManager.cpp @@ -238,10 +238,10 @@ RecordingMemoryManager::CommitAllocations (Process &process) lldb_private::Error err; - size_t allocation_size = ai->m_size + ai->m_alignment - 1; + size_t allocation_size = (ai->m_size ? ai->m_size : 1) + ai->m_alignment - 1; if (allocation_size == 0) - allocation_size = 1; + allocation_size = 1;œ ai->m_remote_allocation = process.AllocateMemory( allocation_size,