summaryrefslogtreecommitdiff
path: root/lib
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
commitc27d326427a96233aa2b594c73bda108f5a641f4 (patch)
tree86aea6c3b466c48604598df7aef887a6543aa78b /lib
parent7423c7821ff30043def78c6cbb257bd2f4d9eef6 (diff)
downloadcompiler-rt-c27d326427a96233aa2b594c73bda108f5a641f4.tar.gz
compiler-rt-c27d326427a96233aa2b594c73bda108f5a641f4.tar.bz2
compiler-rt-c27d326427a96233aa2b594c73bda108f5a641f4.tar.xz
Band-aid fix for the Windows build caused by r177710. Long-term, atomic_compare_exchange_strong should be a template on Windows too...
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/asan/asan_allocator2.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/asan/asan_allocator2.cc b/lib/asan/asan_allocator2.cc
index 7582d8f5..9836e26e 100644
--- a/lib/asan/asan_allocator2.cc
+++ b/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);