HomePhabricator

[lldb] Handle malformed qfThreadInfo reply

Authored by ted on Sep 16 2021, 4:40 PM.

Description

[lldb] Handle malformed qfThreadInfo reply

If the remote gdbserver's qfThreadInfo reply has a trailing comma,
GDBRemoteCommunicationClient::GetCurrentProcessAndThreadIDs will return
an empty vector of thread ids. This will cause lldb to recurse through
three functions trying to get the list of threads, until it blows its
stack and crashes.

A trailing comma is a malformed response, but it shouldn't cause lldb to
crash. This patch will return the tids received before the malformed
response.

Reviewed By: clayborg, labath

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

Details

Committed
tedSep 23 2021, 3:03 PM
Reviewer
clayborg
Differential Revision
D109937: [lldb] Handle malformed qfThreadInfo reply
Parents
rGd83ca624a1d5: [OpenMP] Fix data-race in new device RTL
Branches
Unknown
Tags
Unknown