Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#16040 closed bug (duplicate)

Debugger crashes while loading symbols for libJavaScriptCore.so.18.7.4

Reported by: KapiX Owned by: anevilyak
Priority: normal Milestone: Unscheduled
Component: Applications/Debugger Version: R1/Development
Keywords: Cc:
Blocked By: #14346 Blocking:
Platform: All

Description

To reproduce:

  1. Build debug WebKit with Tools/Scripts/build-webkit --haiku --debug
  2. In WebKitBuild/Debug try to run HaikuLauncher with Debugger.

I tried to add -gdwarf-4 -gstrict-dwarf but it didn't help.

Attachments (2)

Debugger-35555-debug-15-03-2020-23-03-25.report (293.2 KB ) - added by KapiX 5 years ago.
Debugger-4183-debug-17-05-2020-10-07-06.report (1.5 MB ) - added by KapiX 5 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 by X512, 5 years ago

Seems like stack overflow.

comment:2 by pulkomandy, 5 years ago

Indeed, infinite(?) recursion in trying to resolve the namespace for a symbol, and eventually stack overflow. It would probably help to trace the BString that's being built by these functions to see what it's trying to represent, and checking if there is somehow a cycle in the parent/child relationship between debug info entries?

comment:3 by waddlesplash, 5 years ago

Blocked By: 14346 added

Looks nearly identical to #14346, which I reported some time ago.

comment:4 by pulkomandy, 5 years ago

Resolution: duplicate
Status: newclosed

comment:5 by KapiX, 5 years ago

Function at fault:

template<typename T>
CString nodeValuePairListDump(const T& nodeValuePairList, DumpContext* context = 0)
{
    using V = typename T::ValueType;
    T sortedList = nodeValuePairList;
    std::sort(sortedList.begin(), sortedList.end(), [](const V& a, const V& b) {
        return NodeComparator()(a.node, b.node);
    });

Symbol

JSC::DFG::nodeValuePairListDump<WTF::Vector<JSC::DFG::NodeAbstractValuePair, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> >(WTF::Vector<JSC::DFG::NodeAbstractValuePair, 0ul, WTF::CrashOnOverflow, 16ul, WTF::FastMalloc> const&, JSC::DumpContext*)::{lambda(JSC::DFG::NodeAbstractValuePair const&, JSC::DFG::NodeAbstractValuePair const&)#1}::operator()(JSC::DFG::NodeAbstractValuePair const&, JSC::DFG::NodeAbstractValuePair const&) const

It loops after resolving up to (in GetFullyQualifiedDIEName):

JSC::DFG::nodeValuePairListDump<WTF::Vector<JSC::DFG::NodeAbstractValuePair> >(const WTF::Vector<JSC::DFG::NodeAbstractValuePair, 0, WTF::CrashOnOverflow, 16, WTF::FastMalloc>&, JSC::DumpContext*)::<lambda(const V&, const V&)>::

then in GetFullDIEName:

generatedName {
	fPrivateData: operator()(
}
Note: See TracTickets for help on using tickets.