[Lldb-commits] [PATCH] D19122: LLDB: Fixed race condition on timeout when stopping private state thread
Jim Ingham via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 14 15:58:04 PDT 2016
jingham added a subscriber: jingham.
jingham added a comment.
At the Command & SB API level, we restrict access to the process from multiple threads with the run lock. But internally it is currently more of a gentleman's agreement not to do this.
I don't think it would ever be useful to try to make calling functions in the target (which is the job of RunThreadPlan) work concurrently. Rather we should have some higher level permission baton that you have to have to do anything that would run the target, and then let only one thread at a time do this work. That would make it impossible for RunThreadPlan to get run on multiple threads for the same process. So while it wouldn't hurt to protect the m_private_state_thread variable with locks, that's not really the right level to do this, and if you ever let two threads try to run function calls in the target simultaneously, racy-ness in the m_private_state_thread would be the least of your problems...
Jim
Repository:
rL LLVM
http://reviews.llvm.org/D19122
More information about the lldb-commits
mailing list