HomePhabricator

[lldb-vscode] Synchronize calls to SendTerminatedEvent

Authored by asahay on Fri, Jun 11, 8:52 AM.

Description

[lldb-vscode] Synchronize calls to SendTerminatedEvent

If an inferior exits prior to the processing of a disconnect request,
then the threads executing EventThreadFunction and request_discontinue
respectively may call SendTerminatedEvent simultaneously, in turn,
testing and/or setting g_vsc.sent_terminated_event without any
synchronization. In case the thread executing EventThreadFunction sets
it before the thread executing request_discontinue has had a chance to
test it, the latter would move ahead to issue a response to the
disconnect request. Said response may be dispatched ahead of the
terminated event compelling the client to terminate the debug session
without consuming any console output that might've been generated by
the execution of terminateCommands.

Reviewed By: clayborg, wallace

Differential Revision: https://reviews.llvm.org/D103609

Details

Committed
asahayFri, Jun 11, 9:07 AM
Reviewer
clayborg
Differential Revision
D103609: [lldb-vscode] Synchronize calls to SendTerminatedEvent
Parents
rG82a3b606b01d: Update the C status page somewhat.
Branches
Unknown
Tags
Unknown