This is an archive of the discontinued LLVM Phabricator instance.

[lldb/Gui] zero-initialize children_stop_id
ClosedPublic

Authored by rupprecht on Aug 28 2020, 5:03 PM.

Details

Summary

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

I'm not sure if 0 is the right initial value, but the tests pass with it (and msan doesn't complain anymore).

Diff Detail

Event Timeline

rupprecht created this revision.Aug 28 2020, 5:03 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 28 2020, 5:03 PM
rupprecht requested review of this revision.Aug 28 2020, 5:03 PM
clayborg accepted this revision.Sep 2 2020, 5:03 PM
This revision is now accepted and ready to land.Sep 2 2020, 5:03 PM
clayborg added inline comments.Sep 2 2020, 5:06 PM
lldb/source/Core/IOHandlerCursesGUI.cpp
1499–1511

Or we can inline the simple hard coded values into the definitions:

uint32_t children_stop_id = 0;
int row_idx = 0;
int x = 1;
int y = 1;
bool might_have_children = false;
bool expanded = false;
bool calculated_children = false;
std::vector<Row> children;


Row(const ValueObjectSP &v, Row *p)
    : value(v, lldb::eDynamicDontRunTarget, true), parent(p),
      might_have_children(v ? v->MightHaveChildren() : false) {}
rupprecht marked an inline comment as done.Sep 2 2020, 7:43 PM

SG, will land momentarily with the one formatting change. Thanks!

This revision was landed with ongoing or failed builds.Sep 2 2020, 8:06 PM
This revision was automatically updated to reflect the committed changes.