diff options
-rw-r--r-- | compiler-rt/lib/asan/asan_allocator2.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_allocator2.cc b/compiler-rt/lib/asan/asan_allocator2.cc index 9836e26e3fb..7582d8f5234 100644 --- a/compiler-rt/lib/asan/asan_allocator2.cc +++ b/compiler-rt/lib/asan/asan_allocator2.cc @@ -423,8 +423,7 @@ static void Deallocate(void *ptr, StackTrace *stack, AllocType alloc_type) { u8 old_chunk_state = CHUNK_ALLOCATED; // Flip the chunk_state atomically to avoid race on double-free. - if (!atomic_compare_exchange_strong((atomic_uintptr_t*)m, - (uptr*)&old_chunk_state, + if (!atomic_compare_exchange_strong((atomic_uint8_t*)m, &old_chunk_state, CHUNK_QUARANTINE, memory_order_relaxed)) { if (old_chunk_state == CHUNK_QUARANTINE) ReportDoubleFree((uptr)ptr, stack); |