[Lldb-commits] [lldb] r272320 - Fixed a problem in IRMemoryMap where the flag to zero out memory was ignored.

Sean Callanan via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 9 15:22:40 PDT 2016


Author: spyffe
Date: Thu Jun  9 17:22:40 2016
New Revision: 272320

URL: http://llvm.org/viewvc/llvm-project?rev=272320&view=rev
Log:
Fixed a problem in IRMemoryMap where the flag to zero out memory was ignored.

Modified:
    lldb/trunk/source/Expression/IRMemoryMap.cpp

Modified: lldb/trunk/source/Expression/IRMemoryMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRMemoryMap.cpp?rev=272320&r1=272319&r2=272320&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRMemoryMap.cpp (original)
+++ lldb/trunk/source/Expression/IRMemoryMap.cpp Thu Jun  9 17:22:40 2016
@@ -430,6 +430,13 @@ IRMemoryMap::Malloc (size_t size, uint8_
                                                 alignment,
                                                 policy);
 
+    if (zero_memory)
+    {
+        Error write_error;
+        std::vector<uint8_t> zero_buf(size, 0);
+        WriteMemory(aligned_address, zero_buf.data(), size, write_error);
+    }
+
     if (log)
     {
         const char * policy_string;




More information about the lldb-commits mailing list