Skip to content

Commit 5fb3179

Browse files
committed
Used std::vector::reserve when I meant std::vector::resize.
The Linux std has more asserts enabled by default, so it complained, even though this worked on Darwin... (cherry picked from commit 3647ff1)
1 parent 82e6037 commit 5fb3179

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

lldb/source/Commands/CommandObjectCommands.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1417,9 +1417,9 @@ class CommandObjectScriptingObjectParsed : public CommandObjectParsed {
14171417
m_options_definition_up.reset(new OptionDefinition[m_num_options]);
14181418
// We need to hand out pointers to contents of these vectors; we reserve
14191419
// as much as we'll need up front so they don't get freed on resize...
1420-
m_usage_container.reserve(m_num_options);
1421-
m_enum_storage.reserve(m_num_options);
1422-
m_enum_vector.reserve(m_num_options);
1420+
m_usage_container.resize(m_num_options);
1421+
m_enum_storage.resize(m_num_options);
1422+
m_enum_vector.resize(m_num_options);
14231423

14241424
size_t counter = 0;
14251425
size_t short_opt_counter = 0;

lldb/test/API/commands/command/script/add/TestAddParsedCommand.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ class ParsedCommandTestCase(TestBase):
1515

1616
# This crashes on the x86_64 Debian bot, but the failure is not helpful.
1717
# Disable the test while I try to find a way to reproduce.
18-
@skipIfLinux
1918
def test(self):
2019
self.pycmd_tests()
2120

0 commit comments

Comments
 (0)