summaryrefslogtreecommitdiff
path: root/lib/lsan/lsan_common_mac.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/lsan/lsan_common_mac.cpp')
-rw-r--r--lib/lsan/lsan_common_mac.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/lsan/lsan_common_mac.cpp b/lib/lsan/lsan_common_mac.cpp
index 5204a6624..c1804e93c 100644
--- a/lib/lsan/lsan_common_mac.cpp
+++ b/lib/lsan/lsan_common_mac.cpp
@@ -193,8 +193,12 @@ void ProcessPlatformSpecificAllocations(Frontier *frontier) {
// causes rare race conditions.
void HandleLeaks() {}
-void DoStopTheWorld(StopTheWorldCallback callback, void *argument) {
+void LockStuffAndStopTheWorld(StopTheWorldCallback callback, void *argument) {
+ LockThreadRegistry();
+ LockAllocator();
StopTheWorld(callback, argument);
+ UnlockAllocator();
+ UnlockThreadRegistry();
}
} // namespace __lsan