[Lldb-commits] [PATCH] D157159: [lldb] Properly protect the Communication class with reader/writer lock
Alex Langford via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Aug 7 13:27:58 PDT 2023
bulbazord accepted this revision.
bulbazord added a comment.
LGTM
================
Comment at: lldb/source/Core/Communication.cpp:115-118
+ total_written +=
+ WriteUnlocked(static_cast<const char *>(src) + total_written,
+ src_len - total_written, status, error_ptr);
while (status == eConnectionStatusSuccess && total_written < src_len);
----------------
Unrelated to your patch but something about this is triggering my spider sense. Is it possible that `status == eConnectionStatusSuccess` while `WriteUnlocked` returns 0? This might end up in an infinite loop then, no?
Obviously you don't need to address this since it's unrelated, but something to think about for resiliency.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157159/new/
https://reviews.llvm.org/D157159
More information about the lldb-commits
mailing list