diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-03-22 18:05:28 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-03-22 18:05:28 +0000 |
commit | e117eef77f3e510ec8668f68d7d300661bc490d0 (patch) | |
tree | e5da6ce694beb5fc786ce4971360c148c6ecdb49 | |
parent | 1fcf4921afd73214f45847a3fdfcb625461f1715 (diff) | |
download | bcm5719-llvm-e117eef77f3e510ec8668f68d7d300661bc490d0.tar.gz bcm5719-llvm-e117eef77f3e510ec8668f68d7d300661bc490d0.zip |
Band-aid fix for the Windows build caused by r177710. Long-term, atomic_compare_exchange_strong should be a template on Windows too...
llvm-svn: 177745
-rw-r--r-- | compiler-rt/lib/asan/asan_allocator2.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler-rt/lib/asan/asan_allocator2.cc b/compiler-rt/lib/asan/asan_allocator2.cc index 7582d8f5234..9836e26e3fb 100644 --- a/compiler-rt/lib/asan/asan_allocator2.cc +++ b/compiler-rt/lib/asan/asan_allocator2.cc @@ -423,7 +423,8 @@ 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_uint8_t*)m, &old_chunk_state, + if (!atomic_compare_exchange_strong((atomic_uintptr_t*)m, + (uptr*)&old_chunk_state, CHUNK_QUARANTINE, memory_order_relaxed)) { if (old_chunk_state == CHUNK_QUARANTINE) ReportDoubleFree((uptr)ptr, stack); |