summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2013-03-22 18:05:28 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2013-03-22 18:05:28 +0000
commite117eef77f3e510ec8668f68d7d300661bc490d0 (patch)
treee5da6ce694beb5fc786ce4971360c148c6ecdb49
parent1fcf4921afd73214f45847a3fdfcb625461f1715 (diff)
downloadbcm5719-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.cc3
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);
OpenPOWER on IntegriCloud