[Lldb-commits] [lldb] f7e04b7 - [lldb/Gui] zero-initialize children_stop_id

Jordan Rupprecht via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 2 20:06:42 PDT 2020


Author: Jordan Rupprecht
Date: 2020-09-02T20:05:17-07:00
New Revision: f7e04b710d2d90ae913e737550f7eec03d2c9f37

URL: https://github.com/llvm/llvm-project/commit/f7e04b710d2d90ae913e737550f7eec03d2c9f37
DIFF: https://github.com/llvm/llvm-project/commit/f7e04b710d2d90ae913e737550f7eec03d2c9f37.diff

LOG: [lldb/Gui] zero-initialize children_stop_id

This is currently causing msan warnings in the API tests when run under msan, e.g. `commands/gui/basic/TestGuiBasic.py`.

Reviewed By: clayborg

Differential Revision: https://reviews.llvm.org/D86825

Added: 
    

Modified: 
    lldb/source/Core/IOHandlerCursesGUI.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Core/IOHandlerCursesGUI.cpp b/lldb/source/Core/IOHandlerCursesGUI.cpp
index 10aff7a6c217..19066e6be623 100644
--- a/lldb/source/Core/IOHandlerCursesGUI.cpp
+++ b/lldb/source/Core/IOHandlerCursesGUI.cpp
@@ -1497,19 +1497,18 @@ struct Row {
   ValueObjectManager value;
   Row *parent;
   // The process stop ID when the children were calculated.
-  uint32_t children_stop_id;
-  int row_idx;
-  int x;
-  int y;
+  uint32_t children_stop_id = 0;
+  int row_idx = 0;
+  int x = 1;
+  int y = 1;
   bool might_have_children;
-  bool expanded;
-  bool calculated_children;
+  bool expanded = false;
+  bool calculated_children = false;
   std::vector<Row> children;
 
   Row(const ValueObjectSP &v, Row *p)
-      : value(v, lldb::eDynamicDontRunTarget, true), parent(p), row_idx(0),
-        x(1), y(1), might_have_children(v ? v->MightHaveChildren() : false),
-        expanded(false), calculated_children(false), children() {}
+      : value(v, lldb::eDynamicDontRunTarget, true), parent(p),
+        might_have_children(v ? v->MightHaveChildren() : false) {}
 
   size_t GetDepth() const {
     if (parent)


        


More information about the lldb-commits mailing list