Skip to content

Commit f7e04b7

Browse files
committed
[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
1 parent f434f7d commit f7e04b7

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

lldb/source/Core/IOHandlerCursesGUI.cpp

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1497,19 +1497,18 @@ struct Row {
14971497
ValueObjectManager value;
14981498
Row *parent;
14991499
// The process stop ID when the children were calculated.
1500-
uint32_t children_stop_id;
1501-
int row_idx;
1502-
int x;
1503-
int y;
1500+
uint32_t children_stop_id = 0;
1501+
int row_idx = 0;
1502+
int x = 1;
1503+
int y = 1;
15041504
bool might_have_children;
1505-
bool expanded;
1506-
bool calculated_children;
1505+
bool expanded = false;
1506+
bool calculated_children = false;
15071507
std::vector<Row> children;
15081508

15091509
Row(const ValueObjectSP &v, Row *p)
1510-
: value(v, lldb::eDynamicDontRunTarget, true), parent(p), row_idx(0),
1511-
x(1), y(1), might_have_children(v ? v->MightHaveChildren() : false),
1512-
expanded(false), calculated_children(false), children() {}
1510+
: value(v, lldb::eDynamicDontRunTarget, true), parent(p),
1511+
might_have_children(v ? v->MightHaveChildren() : false) {}
15131512

15141513
size_t GetDepth() const {
15151514
if (parent)

0 commit comments

Comments
 (0)