[compiler-rt] r182840 - [sanitizer] Use raw check in internal allocator to prevent self-deadlocks. Try to fix Windows build.
Alexey Samsonov
samsonov at google.com
Wed May 29 03:41:53 PDT 2013
Author: samsonov
Date: Wed May 29 05:41:53 2013
New Revision: 182840
URL: http://llvm.org/viewvc/llvm-project?rev=182840&view=rev
Log:
[sanitizer] Use raw check in internal allocator to prevent self-deadlocks. Try to fix Windows build.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc?rev=182840&r1=182839&r2=182840&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator.cc Wed May 29 05:41:53 2013
@@ -46,7 +46,7 @@ InternalAllocator *internal_allocator()
#else // SANITIZER_GO
-static char internal_alloc_placeholder[sizeof(InternalAllocator)] ALIGNED(64);
+static ALIGNED(64) char internal_alloc_placeholder[sizeof(InternalAllocator)];
static atomic_uint8_t internal_allocator_initialized;
static StaticSpinMutex internal_alloc_init_mu;
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h?rev=182840&r1=182839&r2=182840&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_allocator_internal.h Wed May 29 05:41:53 2013
@@ -44,10 +44,10 @@ typedef SizeClassAllocatorLocalCache<Pri
// We don't want our internal allocator to do any map/unmap operations.
struct CrashOnMapUnmap {
void OnMap(uptr p, uptr size) const {
- CHECK(0 && "Unexpected mmap in InternalAllocator!");
+ RAW_CHECK_MSG(0, "Unexpected mmap in InternalAllocator!");
}
void OnUnmap(uptr p, uptr size) const {
- CHECK(0 && "Unexpected unmap in InternalAllocator!");
+ RAW_CHECK_MSG(0, "Unexpected munmap in InternalAllocator!");
}
};
More information about the llvm-commits
mailing list