Skip to content

Binary Ninja UI freeze when double clicking a function parameter type in HLIL whilst analysis is ongoing #8191

@WeiN76LQh

Description

@WeiN76LQh

Version and Platform (required):

  • Binary Ninja Version: 5.3.9429-dev Ultimate (ea9c02c3)
  • Edition: Ultimate
  • OS: macOS
  • OS Version: 26.4
  • CPU Architecture: M1

Bug Description:
I opened a DYLD Shared Cache database where the Foundation image was loaded. I had recently modified a function workflow for a plugin so upon loading the database analysis began for a number of functions. Whilst analysis was ongoing I double clicked a function parameter type in HLIL (one that was created during the ongoing analysis by the function workflow changes). Binary Ninja then froze for a number of minutes before I presumed its deadlocked.

I apologise because I didn't manage to get a crash dump and I didn't copy any of the call stacks except for the main thread. I also couldn't reproduce the issue. I did notice one of the function analysis threads was doing something related to types (maybe defining a type in a workflow) that seems like it might have deadlocked with the main thread.

The following is the call stack for the main thread:

__ulock_wait2 (@__ulock_wait2:5)
_os_unfair_lock_lock_slow (@_os_unfair_lock_lock_slow:46)
___lldb_unnamed_symbol_220100 (@___lldb_unnamed_symbol_220100:18)
BNGetInstructionLength (@BNGetInstructionLength:24)
LinearView::getSelectionOffsets() (@LinearView::getSelectionOffsets():57)
LinearView::actionContext() (@LinearView::actionContext():14)
MenuInstance::update(UIActionHandler*, UIActionContext const&, bool) (@MenuInstance::update(UIActionHandler*, UIActionContext const&, bool):166)
MainMenuInstance::update(UIActionHandler*, UIActionContext const&) (@MainMenuInstance::update(UIActionHandler*, UIActionContext const&):662)
MainMenuInstance::update(UIActionHandler*) (@MainMenuInstance::update(UIActionHandler*):53)
___lldb_unnamed_symbol_1000dda34 (@___lldb_unnamed_symbol_1000dda34:892)
___lldb_unnamed_symbol_4eb838 (@___lldb_unnamed_symbol_4eb838:15)
void doActivate<false>(QObject*, int, void**) (@void doActivate<false>(QObject*, int, void**):354)
TokenizedTextWidget::selectionChanged(TokenizedTextWidgetCursorPosition const&, TokenizedTextWidgetCursorPosition const&) (@TokenizedTextWidget::selectionChanged(TokenizedTextWidgetCursorPosition const&, TokenizedTextWidgetCursorPosition const&):17)
TokenizedTextWidget::setSelection(TokenizedTextWidgetCursorPosition, TokenizedTextWidgetCursorPosition, TokenizedTextWidgetSelectionStyle) (@TokenizedTextWidget::setSelection(TokenizedTextWidgetCursorPosition, TokenizedTextWidgetCursorPosition, TokenizedTextWidgetSelectionStyle):132)
TypeEditor::selectOffsetRange(BinaryNinja::QualifiedName const&, unsigned long long, unsigned long long) (@TypeEditor::selectOffsetRange(BinaryNinja::QualifiedName const&, unsigned long long, unsigned long long):115)
___lldb_unnamed_symbol_4f5294 (@___lldb_unnamed_symbol_4f5294:75)
TypeBrowserModel::runAfterUpdate(std::__1::function<void ()>) (@TypeBrowserModel::runAfterUpdate(std::__1::function<void ()>):44)
TypeBrowserView::navigateToType(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long long) (@TypeBrowserView::navigateToType(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, unsigned long long):52)
___lldb_unnamed_symbol_1001188e8 (@___lldb_unnamed_symbol_1001188e8:102)
LinearView::mouseDoubleClickEvent(QMouseEvent*) (@LinearView::mouseDoubleClickEvent(QMouseEvent*):99)
QWidget::event(QEvent*) (@QWidget::event(QEvent*):31)
QFrame::event(QEvent*) (@QFrame::event(QEvent*):16)
QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) (@QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*):67)
QApplicationPrivate::notify_helper(QObject*, QEvent*) (@QApplicationPrivate::notify_helper(QObject*, QEvent*):79)
QApplication::notify(QObject*, QEvent*) (@QApplication::notify(QObject*, QEvent*):1186)
QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (@QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*):46)
QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) (@QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool):244)
QWidgetWindow::handleMouseEvent(QMouseEvent*) (@QWidgetWindow::handleMouseEvent(QMouseEvent*):337)
QWidgetWindow::event(QEvent*) (@QWidgetWindow::event(QEvent*):28)
QApplicationPrivate::notify_helper(QObject*, QEvent*) (@QApplicationPrivate::notify_helper(QObject*, QEvent*):87)
QApplication::notify(QObject*, QEvent*) (@QApplication::notify(QObject*, QEvent*):120)
QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (@QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*):46)
QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) (@QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*):641)
QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (@QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>):105)
QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) (@QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*):132)
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ (@__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__:10)
__CFRunLoopDoSource0 (@__CFRunLoopDoSource0:46)
__CFRunLoopDoSources0 (@__CFRunLoopDoSources0:86)
__CFRunLoopRun (@__CFRunLoopRun:208)
_CFRunLoopRunSpecificWithOptions (@_CFRunLoopRunSpecificWithOptions:136)

Additional Information:
Unsure if this is related to #7298.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions