[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-23 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. Cool, I've also pushed 9321255b that fixes up other occurrences of this pattern, and adds an assertion to prevent it from happening again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST AC

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-22 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. In D77295#1996337 , @labath wrote: > In D77295#1995077 , @JDevlieghere > wrote: > > > Hi Pavel, > > > > After this landed I started seeing a bunch of reproducers fail with > > `SIGPIP

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-22 Thread Pavel Labath via Phabricator via lldb-commits
labath added a comment. In D77295#1995077 , @JDevlieghere wrote: > Hi Pavel, > > After this landed I started seeing a bunch of reproducers fail with > `SIGPIPE`. I ignored the signal and added a check for `EPIPE` to the > `::write` call in `PipePosix.cp

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-21 Thread Jonas Devlieghere via Phabricator via lldb-commits
JDevlieghere added a comment. Hi Pavel, After this landed I started seeing a bunch of reproducers fail with `SIGPIPE`. I ignored the signal and added a check for `EPIPE` to the `::write` call in `PipePosix.cpp`. Below is the thread state: * thread #1, queue = 'com.apple.main-thread', stop re

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-09 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGebb071345cda: [lldb/Core] Fix a race in the Communication class (authored by labath). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77295/new/ https://revie

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-06 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 255310. labath marked an inline comment as done. labath added a comment. refactor EOF handling Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77295/new/ https://reviews.llvm.org/D77295 Files: lldb/source/Core/

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-06 Thread Pavel Labath via Phabricator via lldb-commits
labath marked 3 inline comments as done. labath added inline comments. Comment at: lldb/source/Core/Communication.cpp:318 bool done = false; + bool disconnect = false; while (!done && comm->m_read_thread_enabled) { clayborg wrote: > Can we just init "disco

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-02 Thread Greg Clayton via Phabricator via lldb-commits
clayborg added inline comments. Comment at: lldb/source/Core/Communication.cpp:318 bool done = false; + bool disconnect = false; while (!done && comm->m_read_thread_enabled) { Can we just init "disconnect" right here?: ``` const bool disconnect = comm->Ge

[Lldb-commits] [PATCH] D77295: [lldb/Core] Fix a race in the Communication class

2020-04-02 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. labath added reviewers: clayborg, JDevlieghere. Herald added a subscriber: mgorny. Herald added a project: LLDB. Communication::SynchronizeWithReadThread is called whenever a process stops to ensure that we process all of its stdout before we report the stop. If the p