This revision was automatically updated to reflect the committed changes.
Closed by commit rG9c135f1478cd: [lldb] Fix data race in NativeFile (authored
by JDevlieghere).
Changed prior to commit:
https://reviews.llvm.org/D157347?vs=548849&id=549116#toc
Repository:
rG LLVM Github Monorepo
CHA
bulbazord accepted this revision.
bulbazord added a comment.
This revision is now accepted and ready to land.
LGTM!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157347/new/
https://reviews.llvm.org/D157347
___
lldb-commits mailing list
lldb-
JDevlieghere added inline comments.
Comment at: lldb/source/Host/common/File.cpp:609
num_bytes = bytes_written;
- } else if (StreamIsValid()) {
+ } else if (ValueGuard stream_guard = StreamIsValid()) {
bytes_written = ::fwrite(buf, 1, num_bytes, m_stream);
-
JDevlieghere updated this revision to Diff 548849.
JDevlieghere marked 4 inline comments as done.
JDevlieghere added a comment.
Limit scope of `ValueGuard` by avoiding `else if`.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157347/new/
https://reviews.llvm.org/D157347
Files:
lldb/in
augusto2112 added inline comments.
Comment at: lldb/source/Host/common/File.cpp:609
num_bytes = bytes_written;
- } else if (StreamIsValid()) {
+ } else if (ValueGuard stream_guard = StreamIsValid()) {
bytes_written = ::fwrite(buf, 1, num_bytes, m_stream);
--
bulbazord requested changes to this revision.
bulbazord added inline comments.
This revision now requires changes to proceed.
Comment at: lldb/source/Host/common/File.cpp:609
num_bytes = bytes_written;
- } else if (StreamIsValid()) {
+ } else if (ValueGuard stream_guard
augusto2112 accepted this revision.
augusto2112 added a comment.
I have one nit that I'll leave up to you whether it should be addressed now or
not.
Comment at: lldb/source/Host/common/File.cpp:545
num_bytes = bytes_read;
- } else if (StreamIsValid()) {
+ } else if (V
bulbazord accepted this revision.
bulbazord added a comment.
This revision is now accepted and ready to land.
Looks right to me now. Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157347/new/
https://reviews.llvm.org/D157347
___
lldb-c
JDevlieghere updated this revision to Diff 548729.
JDevlieghere marked an inline comment as done.
JDevlieghere added a comment.
Address @bulbazord's code review feedback
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157347/new/
https://reviews.llvm.org/D157347
Files:
lldb/include/lld
bulbazord added inline comments.
Comment at: lldb/include/lldb/Host/File.h:425-433
+ ValueGuard DescriptorIsValid() const {
+m_descriptor_mutex.lock();
+return ValueGuard(m_descriptor_mutex,
+ File::DescriptorIsValid(m_descriptor));
+ }
+
+ ValueGu
JDevlieghere updated this revision to Diff 548056.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157347/new/
https://reviews.llvm.org/D157347
Files:
lldb/include/lldb/Host/File.h
lldb/source/Host/common/File.cpp
Index: lldb/source/Host/common/File.cpp
===
11 matches
Mail list logo