mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-27 23:41:02 +08:00
Remove failing thread suspend DCHECK
Removes a failing DCHECK in process_reader_win.cc caused by a race condition with a thread being injected into a process whose existing threads are already suspended. Bug: chromium:1007013 Change-Id: Ifa569220b28e8e2e5dfa6c32b2be4c57f61076b3 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2047803 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Brian Sheedy <bsheedy@chromium.org>
This commit is contained in:
parent
7ed4d5c454
commit
ff1036aa60
@ -151,11 +151,17 @@ bool FillThreadContextAndSuspendCount(HANDLE thread_handle,
|
||||
PLOG(ERROR) << "SuspendThread";
|
||||
return false;
|
||||
}
|
||||
DCHECK(previous_suspend_count > 0 ||
|
||||
suspension_state == ProcessSuspensionState::kRunning);
|
||||
thread->suspend_count =
|
||||
previous_suspend_count -
|
||||
(suspension_state == ProcessSuspensionState::kSuspended ? 1 : 0);
|
||||
if (previous_suspend_count <= 0 &&
|
||||
suspension_state == ProcessSuspensionState::kSuspended) {
|
||||
LOG(WARNING) << "Thread " << thread->id
|
||||
<< " should be suspended, but previous_suspend_count is "
|
||||
<< previous_suspend_count;
|
||||
thread->suspend_count = 0;
|
||||
} else {
|
||||
thread->suspend_count =
|
||||
previous_suspend_count -
|
||||
(suspension_state == ProcessSuspensionState::kSuspended ? 1 : 0);
|
||||
}
|
||||
|
||||
memset(&thread->context, 0, sizeof(thread->context));
|
||||
#if defined(ARCH_CPU_32_BITS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user