Skip to content

Commit 1d0d1f2

Browse files
committed
[msan] Remove unneeded nullness CHECK
The pointer will immediate be dereferenced.
1 parent 2438f41 commit 1d0d1f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

compiler-rt/lib/msan/msan_allocator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ void __msan::LockAllocator() { allocator.ForceLock(); }
169169
void __msan::UnlockAllocator() { allocator.ForceUnlock(); }
170170

171171
AllocatorCache *GetAllocatorCache(MsanThreadLocalMallocStorage *ms) {
172-
CHECK(ms);
173172
CHECK_LE(sizeof(AllocatorCache), sizeof(ms->allocator_cache));
174173
return reinterpret_cast<AllocatorCache *>(ms->allocator_cache);
175174
}
@@ -237,7 +236,7 @@ static void *MsanAllocate(BufferedStackTrace *stack, uptr size, uptr alignment,
237236
}
238237

239238
void __msan::MsanDeallocate(BufferedStackTrace *stack, void *p) {
240-
CHECK(p);
239+
DCHECK(p);
241240
UnpoisonParam(1);
242241
RunFreeHooks(p);
243242

0 commit comments

Comments
 (0)