Skip to content

Crash below DebuggerController::DetachAndWait #1083

Description

@sentry

Sentry Issue: BINARYNINJA-7K

SIGSEGV / SEGV_MAPERR / 0x10: Fatal Error: SIGSEGV / SEGV_MAPERR / 0x10
  File "pthread_mutex_lock.c", line 80, in ___pthread_mutex_lock
  File "gthr-default.h", line 749, in __gthread_mutex_lock
  File "gthr-default.h", line 811, in __gthread_recursive_mutex_lock
  File "mutex", line 108, in std::recursive_mutex::lock
  File "unique_lock.h", line 139, in std::unique_lock<T>::lock
...
(25 additional frame(s) were not displayed)

@bdash says:

DebuggerController::Detach spawns a background thread to run DetachAndWait. Nothing ensures that the ref counted DebuggerController remains alive for the duration of that call.

void DebuggerController::Detach()
{
if (!m_state->IsConnected())
return;
std::thread([&]() { DetachAndWait(); }).detach();
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions