summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/lsan
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/lsan')
-rw-r--r--compiler-rt/lib/lsan/lsan_allocator.cc3
-rw-r--r--compiler-rt/lib/lsan/lsan_common.cc4
2 files changed, 2 insertions, 5 deletions
diff --git a/compiler-rt/lib/lsan/lsan_allocator.cc b/compiler-rt/lib/lsan/lsan_allocator.cc
index 49b5a9fa4c5..3ae773b21bd 100644
--- a/compiler-rt/lib/lsan/lsan_allocator.cc
+++ b/compiler-rt/lib/lsan/lsan_allocator.cc
@@ -133,8 +133,7 @@ void GetAllocatorGlobalRange(uptr *begin, uptr *end) {
}
void *PointsIntoChunk(void* p) {
- if (!allocator.PointerIsMine(p)) return 0;
- void *chunk = allocator.GetBlockBegin(p);
+ void *chunk = allocator.GetBlockBeginFastLocked(p);
if (!chunk) return 0;
// LargeMmapAllocator considers pointers to the meta-region of a chunk to be
// valid, but we don't want that.
diff --git a/compiler-rt/lib/lsan/lsan_common.cc b/compiler-rt/lib/lsan/lsan_common.cc
index e2971e999aa..f6e93ae09f1 100644
--- a/compiler-rt/lib/lsan/lsan_common.cc
+++ b/compiler-rt/lib/lsan/lsan_common.cc
@@ -236,7 +236,7 @@ static void LockAndSuspendThreads(StopTheWorldCallback callback, void *arg) {
LockThreadRegistry();
LockAllocator();
StopTheWorld(callback, arg);
- // Allocator must be unlocked by the callback.
+ UnlockAllocator();
UnlockThreadRegistry();
}
@@ -293,8 +293,6 @@ static void DoLeakCheckCallback(const SuspendedThreadsList &suspended_threads,
void *arg) {
LeakCheckResult *result = reinterpret_cast<LeakCheckResult *>(arg);
CHECK_EQ(*result, kFatalError);
- // Allocator must not be locked when we call GetRegionBegin().
- UnlockAllocator();
ClassifyAllChunks(suspended_threads);
LeakReport leak_report;
CollectLeaks(&leak_report);
OpenPOWER on IntegriCloud