Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent a possible assert in the debugger when a thread detaches #1283

Merged
merged 1 commit into from
Apr 14, 2020

Commits on Apr 14, 2020

  1. Prevent a possible assert in the debugger when a thread detaches

    When a new thread is attached to the VM, the debugger will add it to the
    `thread_to_tls` hash table. When that thread detaches, it will be
    removed. Once the thread is attached, if a client is debugging, the
    client can use the `CMD_THREAD_GET_FRAME_INFO` command to ask for
    details about that thread.
    
    This is a possibility that the thread detaches before the
    `CMD_THREAD_GET_FRAME_INFO` command is processed, so the thread may not
    exist the the `thread_to_tls` hash table any more.
    
    This is a race condition, but is a valid state, so instead of asserting,
    the debugger agent should indicate to the client that the thread no
    longer exists, using `ERR_UNLOADED`.
    Josh Peterson committed Apr 14, 2020
    Configuration menu
    Copy the full SHA
    f927857 View commit details
    Browse the repository at this point in the history