[llvm-bugs] [Bug 39897] New: NativePDB reader detects multiple symbols with the same address in chrome_child.pdb

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Dec 5 09:50:35 PST 2018


https://bugs.llvm.org/show_bug.cgi?id=39897

            Bug ID: 39897
           Summary: NativePDB reader detects multiple symbols with the
                    same address in chrome_child.pdb
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: DebugInfo
          Assignee: unassignedbugs at nondot.org
          Reporter: mosescu at google.com
                CC: jdevlieghere at apple.com, keith.walker at arm.com,
                    llvm-bugs at lists.llvm.org,
                    paul_robinson at playstation.sony.com

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)

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20181205/33da30d5/attachment-0001.html>


More information about the llvm-bugs mailing list