[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-15 Thread Augusto Noronha via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG22413641e236: [lldb] Fix data race in PipePosix (authored by augusto2112). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157654/new/ https://reviews.llvm.or

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-12 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere accepted this revision. JDevlieghere added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157654/new/ https://reviews.llvm.org/D157654 __

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 updated this revision to Diff 549548. augusto2112 added a comment. Changed to regular mutex Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157654/new/ https://reviews.llvm.org/D157654 Files: lldb/include/lldb/Host/posix/PipePosix.h

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D157654#4581578 , @augusto2112 wrote: > @JDevlieghere I updated this to two shared mutexes because I'm assuming you > can have more than one concurrent read and more than one concurrent write. If > this is wrong I can g

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 added a comment. @JDevlieghere I updated this to two shared mutexes because I'm assuming you can have more than one concurrent read and more than one concurrent write. If this is wrong I can go back to two regular mutexes. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 updated this revision to Diff 549539. augusto2112 added a comment. Update to two shared mutexes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157654/new/ https://reviews.llvm.org/D157654 Files: lldb/include/lldb/Host/posix/PipePosix.

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere requested changes to this revision. JDevlieghere added a comment. This revision now requires changes to proceed. Shouldn't we have two murexes, one for the read FD and one for the write FD? The current approach is overly strict: it preventing concurrent reads and writes because `Rea

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 updated this revision to Diff 549454. augusto2112 added a comment. Lock earlier in operator= Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157654/new/ https://reviews.llvm.org/D157654 Files: lldb/include/lldb/Host/posix/PipePosix.h

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-11 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 added inline comments. Comment at: lldb/source/Host/posix/PipePosix.cpp:69 PipeBase::operator=(std::move(pipe_posix)); - m_fds[READ] = pipe_posix.ReleaseReadFileDescriptor(); - m_fds[WRITE] = pipe_posix.ReleaseWriteFileDescriptor(); + std::lock_guard guard(m_loc

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-10 Thread Alex Langford via Phabricator via lldb-commits
bulbazord added inline comments. Comment at: lldb/source/Host/posix/PipePosix.cpp:69 PipeBase::operator=(std::move(pipe_posix)); - m_fds[READ] = pipe_posix.ReleaseReadFileDescriptor(); - m_fds[WRITE] = pipe_posix.ReleaseWriteFileDescriptor(); + std::lock_guard guard(m_lock)

[Lldb-commits] [PATCH] D157654: [lldb] Fix data race in PipePosix

2023-08-10 Thread Augusto Noronha via Phabricator via lldb-commits
augusto2112 created this revision. augusto2112 added reviewers: JDevlieghere, bulbazord. Herald added a subscriber: kristof.beyls. Herald added a project: All. augusto2112 requested review of this revision. Herald added a project: LLDB. Herald added a subscriber: lldb-commits. Thread sanitizer rep