From fb74020cea58c9dec85e503d7ac150fa731a423e Mon Sep 17 00:00:00 2001 From: Timur Iskhodzhanov Date: Fri, 22 Mar 2013 18:16:57 +0000 Subject: [PATCH] Revert 177745 as it was incorrect llvm-svn: 177746 --- compiler-rt/lib/asan/asan_allocator2.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler-rt/lib/asan/asan_allocator2.cc b/compiler-rt/lib/asan/asan_allocator2.cc index 9836e26e3fbb..7582d8f52346 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);