mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Make ExceptionHandlerServer::keep_running_ atomic
ExceptionHandlerServer::keep_running_ is used to implement synchronization across threads (e.g. ExceptionHandlerServer::Stop) but the variable is not atomic. This causes TSan failures and could also lead to incorrect compiler optimizations. Bug: crashpad:304 Change-Id: I3cf5c083d70b6be903e16dbb6feb8fecea2aa1b8 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/1706793 Reviewed-by: Joshua Peraza <jperaza@chromium.org> Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
This commit is contained in:
parent
a079d8b15b
commit
4f0a0f5d36
@ -18,6 +18,7 @@
|
|||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
@ -181,7 +182,7 @@ class ExceptionHandlerServer {
|
|||||||
std::unique_ptr<PtraceStrategyDecider> strategy_decider_;
|
std::unique_ptr<PtraceStrategyDecider> strategy_decider_;
|
||||||
Delegate* delegate_;
|
Delegate* delegate_;
|
||||||
ScopedFileHandle pollfd_;
|
ScopedFileHandle pollfd_;
|
||||||
bool keep_running_;
|
std::atomic<bool> keep_running_;
|
||||||
InitializationStateDcheck initialized_;
|
InitializationStateDcheck initialized_;
|
||||||
|
|
||||||
DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServer);
|
DISALLOW_COPY_AND_ASSIGN(ExceptionHandlerServer);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user