Skip to content

Commit 40941f1

Browse files
authored
[LLDB][Minidump] Add some buffer directories (#138943)
Add a generous amount of buffer directories. I found out some LLDB forks (internal and external) had custom ranges that could fail because we didn't pre-account for those. To prevent this from being a problem, I've added a large number of buffer directories at the cost of 240 bytes.
1 parent 9048c2d commit 40941f1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/source/Plugins/ObjectFile/Minidump/MinidumpFileBuilder.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,12 @@ Status MinidumpFileBuilder::AddHeaderAndCalculateDirectories() {
7575
}
7676
}
7777

78+
// Add a generous buffer of directories, these are quite small
79+
// and forks may add new directories upstream LLDB hadn't accounted for
80+
// when we started pre-calculating directory size, so this should account for
81+
// that
82+
m_expected_directories += 100;
83+
7884
m_saved_data_size +=
7985
m_expected_directories * sizeof(llvm::minidump::Directory);
8086
Status error;

0 commit comments

Comments
 (0)