Skip to content

Commit 87404ea

Browse files
committed
[lldb] Fix undefined behavior in DWARFExpressionTest
RegisterInfo is a trivial class and doesn't default initialize its members. Thanks Alex for getting to the bottom of this.
1 parent 184821b commit 87404ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lldb/unittests/Expression/DWARFExpressionTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ class MockRegisterContext : public RegisterContext {
125125
}
126126

127127
private:
128-
RegisterInfo m_reg_info;
129-
RegisterValue m_reg_value;
128+
RegisterInfo m_reg_info{};
129+
RegisterValue m_reg_value{};
130130
};
131131
} // namespace
132132

0 commit comments

Comments
 (0)