[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-10 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-10 Thread Alex Langford via Phabricator via lldb-commits
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-

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
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); -

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Augusto Noronha via Phabricator via lldb-commits
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); --

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Alex Langford via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Augusto Noronha via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Alex Langford via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-09 Thread Jonas Devlieghere via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-08 Thread Alex Langford via Phabricator via lldb-commits
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

[Lldb-commits] [PATCH] D157347: [lldb] Fix data race in NativeFile

2023-08-07 Thread Jonas Devlieghere via Phabricator via lldb-commits
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 ===