aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/MachOObjectFile.cpp
diff options
context:
space:
mode:
authorroyitaqi <royitaqi@users.noreply.github.com>2025-08-06 10:24:09 -0700
committerGitHub <noreply@github.com>2025-08-06 10:24:09 -0700
commitbb2642fab70fb4d59e431e01e319dcf6b90d88d8 (patch)
tree416a8edccb739a9779068bcf9b7a6b4dbc633489 /llvm/lib/Object/MachOObjectFile.cpp
parentb291d02a93bcd24c34cdc0febc327270dc9ceb0c (diff)
downloadllvm-bb2642fab70fb4d59e431e01e319dcf6b90d88d8.zip
llvm-bb2642fab70fb4d59e431e01e319dcf6b90d88d8.tar.gz
llvm-bb2642fab70fb4d59e431e01e319dcf6b90d88d8.tar.bz2
[vscode-lldb] Fix race condition when changing lldb-dap arguments (#151828)
# Problem When the user changes lldb-dap's arguments (e.g. path), there is a race condition, where the new lldb-dap process could be started first and have set the extension's `serverProcess` and `serverInfo` according to the new process, while the old lldb-dap process exits later and wipes out these two fields. Consequences: 1. This causes `getServerProcess()` to return `undefined` when it should return the new process. 2. This also causes wrong behavior when starting the next debug session that a new lldb-dap process will be started and the old not reused nor killed. # Fix When wiping the two fields, check if `serverProcess` equals to the process captured by the handler. If they equal, wipe the fields. If not, then the fields have already been updated (either new process has started, or the fields were already wiped out by another handler), and so the wiping should be skipped.
Diffstat (limited to 'llvm/lib/Object/MachOObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions