[Lldb-commits] [lldb] r177082 - <rdar://problem/13413693>
Greg Clayton
gclayton at apple.com
Thu Mar 14 09:47:57 PDT 2013
Author: gclayton
Date: Thu Mar 14 11:47:56 2013
New Revision: 177082
URL: http://llvm.org/viewvc/llvm-project?rev=177082&view=rev
Log:
<rdar://problem/13413693>
Fixed a crasher in the new DWARF in .o files line table linking function where "back()" could end up being called on an empty std::vector.
Modified:
lldb/trunk/source/Symbol/LineTable.cpp
Modified: lldb/trunk/source/Symbol/LineTable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/LineTable.cpp?rev=177082&r1=177081&r2=177082&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/LineTable.cpp (original)
+++ lldb/trunk/source/Symbol/LineTable.cpp Thu Mar 14 11:47:56 2013
@@ -524,7 +524,7 @@ LineTable::LinkLineTable (const FileRang
{
prev_end_entry_linked_file_addr = std::min<lldb::addr_t>(entry.file_addr, prev_file_range_entry->GetRangeEnd()) - prev_file_range_entry->GetRangeBase() + prev_file_range_entry->data;
if (prev_end_entry_linked_file_addr != entry_linked_file_addr)
- terminate_previous_entry = true;
+ terminate_previous_entry = prev_entry_was_linked;
}
}
else if (prev_entry_was_linked)
@@ -540,7 +540,7 @@ LineTable::LinkLineTable (const FileRang
}
}
- if (terminate_previous_entry)
+ if (terminate_previous_entry && !sequence.m_entries.empty())
{
assert (prev_file_addr != LLDB_INVALID_ADDRESS);
sequence.m_entries.push_back(sequence.m_entries.back());
More information about the lldb-commits
mailing list