<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - NativePDB reader detects multiple symbols with the same address in chrome_child.pdb"
href="https://bugs.llvm.org/show_bug.cgi?id=39897">39897</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>NativePDB reader detects multiple symbols with the same address in chrome_child.pdb
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>DebugInfo
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mosescu@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>jdevlieghere@apple.com, keith.walker@arm.com, llvm-bugs@lists.llvm.org, paul_robinson@playstation.sony.com
</td>
</tr></table>
<p>
<div>
<pre>It's not clear if the debug information is valid or not, but the current code
asserts this should not happen:
void PdbIndex::BuildAddrToSymbolMap(CompilandIndexItem &cci) {
...
for (auto iter = syms.begin(); iter != syms.end(); ++iter) {
...
// If the debug info is incorrect, we could have multiple symbols with the
// same address. So use try_emplace instead of insert, and the first one
// will win.
auto insert_result =
cci.m_symbols_by_va.insert(std::make_pair(va, PdbSymUid(cu_sym_id)));
(void)insert_result;
// The odds of an error in some function such as GetSegmentAndOffset or
// MakeVirtualAddress are much higher than the odds of encountering bad
// debug info, so assert that this item was inserted in the map as opposed
// to having already been there.
lldbassert(insert_result.second);
}
}
Loading a Chrome minidump which points to chrome_child.pdb leads to this:
tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp:158: void
lldb_private::npdb::PdbIndex::BuildAddrToSymbolMap(lldb_private::npdb::CompilandIndexItem&):
Assertion `insert_result.second' failed.
libc.so.6!__GI___assert_fail(const char * assertion, const char * file,
unsigned int line, const char * function)
(/tmp/build-debs.Lfl5zt/glibc-2.24/assert/assert.c:101)
liblldb.so.8svn!lldb_private::npdb::PdbIndex::BuildAddrToSymbolMap(lldb_private::npdb::PdbIndex
* const this, lldb_private::npdb::CompilandIndexItem & cci)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp:158)
liblldb.so.8svn!lldb_private::npdb::PdbIndex::FindSymbolsByVa(lldb_private::npdb::PdbIndex
* const this, lldb::addr_t va)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/SymbolFile/NativePDB/PdbIndex.cpp:171)
liblldb.so.8svn!lldb_private::npdb::SymbolFileNativePDB::ResolveSymbolContext(lldb_private::npdb::SymbolFileNativePDB
* const this, const lldb_private::Address & addr, lldb::SymbolContextItem
resolve_scope, lldb_private::SymbolContext & sc)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.cpp:1498)
liblldb.so.8svn!lldb_private::SymbolVendor::ResolveSymbolContext(lldb_private::SymbolVendor
* const this, const lldb_private::Address & so_addr, lldb::SymbolContextItem
resolve_scope, lldb_private::SymbolContext & sc)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Symbol/SymbolVendor.cpp:240)
liblldb.so.8svn!lldb_private::Module::ResolveSymbolContextForAddress(lldb_private::Module
* const this, const lldb_private::Address & so_addr, lldb::SymbolContextItem
resolve_scope, lldb_private::SymbolContext & sc, bool
resolve_tail_call_address)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Core/Module.cpp:467)
liblldb.so.8svn!lldb_private::RegisterContextLLDB::InitializeNonZerothFrame(lldb_private::RegisterContextLLDB
* const this)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp:449)
liblldb.so.8svn!lldb_private::RegisterContextLLDB::RegisterContextLLDB(lldb_private::RegisterContextLLDB
* const this, lldb_private::Thread & thread, const
lldb_private::RegisterContextLLDB::SharedPtr & next_frame,
lldb_private::SymbolContext & sym_ctx, uint32_t frame_number,
lldb_private::UnwindLLDB & unwind_lldb)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp:68)
liblldb.so.8svn!lldb_private::UnwindLLDB::GetOneMoreFrame(lldb_private::UnwindLLDB
* const this, lldb_private::ABI * abi)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp:131)
liblldb.so.8svn!lldb_private::UnwindLLDB::AddOneMoreFrame(lldb_private::UnwindLLDB
* const this, lldb_private::ABI * abi)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp:338)
liblldb.so.8svn!lldb_private::UnwindLLDB::UpdateUnwindPlanForFirstFrameIfInvalid(lldb_private::UnwindLLDB
* const this, lldb_private::ABI * abi)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp:311)
liblldb.so.8svn!lldb_private::UnwindLLDB::AddFirstFrame(lldb_private::UnwindLLDB
* const this)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp:101)
liblldb.so.8svn!lldb_private::UnwindLLDB::DoGetFrameInfoAtIndex(lldb_private::UnwindLLDB
* const this, uint32_t idx, lldb::addr_t & cfa, lldb::addr_t & pc)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Plugins/Process/Utility/UnwindLLDB.cpp:403)
liblldb.so.8svn!lldb_private::Unwind::GetFrameInfoAtIndex(lldb_private::Unwind
* const this, uint32_t frame_idx, lldb::addr_t & cfa, lldb::addr_t & pc)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/include/lldb/Target/Unwind.h:55)
liblldb.so.8svn!lldb_private::StackFrameList::GetFramesUpTo(lldb_private::StackFrameList
* const this, uint32_t end_idx)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Target/StackFrameList.cpp:460)
liblldb.so.8svn!lldb_private::StackFrameList::GetFrameAtIndex(lldb_private::StackFrameList
* const this, uint32_t idx)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Target/StackFrameList.cpp:655)
liblldb.so.8svn!lldb_private::StackFrameList::SetDefaultFileAndLineToSelectedFrame(lldb_private::StackFrameList
* const this)
(/usr/local/google/home/mosescu/extra/llvm/src/tools/lldb/source/Target/StackFrameList.cpp:803)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>