Go to file
Pavel Labath 194357c509 Fix a race in ProcessGDBRemote::MonitorDebugServerProcess
Summary:
MonitorDebugServerProcess went to a lot of effort to make sure its asynchronous invocation does
not cause any mischief, but it was still not race-free. Specifically, in a quick stop-restart
sequence (like the one in TestAddressBreakpoints) the copying of the process shared pointer via
target_sp->GetProcessSP() was racing with the resetting of the pointer in DeleteCurrentProcess,
as they were both accessing the same shared_ptr object.

To avoid this, I simply pass in a weak_ptr to the process when the callback is created. Locking
this pointer is race-free as they are two separate object even though they point to the same
process instance. This also removes the need for the complicated tap-dance around retrieving the
process pointer.

Reviewers: clayborg

Subscribers: tberghammer, lldb-commits

Differential Revision: http://reviews.llvm.org/D20107

llvm-svn: 269281
2016-05-12 11:10:01 +00:00
clang [Driver] Squash misleading indentation warning. 2016-05-12 10:27:59 +00:00
clang-tools-extra [clang-tidy] Ignore using-declarations defined in marcro in misc-unused-using-decls checks. 2016-05-12 10:00:49 +00:00
compiler-rt [ASan] [SystemZ] Add -mbackchain to test cflags. 2016-05-12 08:49:34 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc math: Add erf ported from amd-builtins 2016-05-06 18:02:30 +00:00
libcxx [libcxx] Prefer C++14 over C++11 when building libc++experimental. 2016-05-10 16:17:43 +00:00
libcxxabi libc++abi: make __cxa_call_unexpected visible 2016-05-11 23:56:37 +00:00
libunwind unwind: remove last instance of -Wexpansion-to-defined 2016-04-26 01:11:29 +00:00
lld [ELF] implemented -z defs option 2016-05-11 13:48:41 +00:00
lldb Fix a race in ProcessGDBRemote::MonitorDebugServerProcess 2016-05-12 11:10:01 +00:00
llgo [llgo] llgoi: separate evaluation from printing 2016-04-25 01:18:20 +00:00
llvm [mips][ias] Handle N64 compound relocations and R_MIPS_SUB in needsRelocateWithSymbol() 2016-05-12 10:55:00 +00:00
openmp Restore NULL flag check in __kmp_null_resume_wrapper 2016-05-12 00:54:08 +00:00
polly Invalidate unprofitable SCoPs after creation 2016-05-10 16:38:09 +00:00