diff options
| author | Yury Gribov <y.gribov@samsung.com> | 2015-12-10 11:07:19 +0000 |
|---|---|---|
| committer | Yury Gribov <y.gribov@samsung.com> | 2015-12-10 11:07:19 +0000 |
| commit | 90a36c5ba132d95b03f78a09f2e47779948517a0 (patch) | |
| tree | 7e1872329f4d016e8199a00572971b106978a116 | |
| parent | 86de80db37692cc3a789b89c752a2fb527e839f8 (diff) | |
| download | bcm5719-llvm-90a36c5ba132d95b03f78a09f2e47779948517a0.tar.gz bcm5719-llvm-90a36c5ba132d95b03f78a09f2e47779948517a0.zip | |
[asan] Use atomic_uintptr_t instead of atomic_uint64_t in SuppressErrorReport.
Some targets (e.g. Mips) don't have 64-bit atomics, so using atomic_uint64_t
leads to build failures. Use atomic_uintptr_t to avoid such errors.
Patch by Max Ostapenko.
llvm-svn: 255242
| -rw-r--r-- | compiler-rt/lib/asan/asan_report.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_report.cc b/compiler-rt/lib/asan/asan_report.cc index b9e654e6aa1..0fb60846c3b 100644 --- a/compiler-rt/lib/asan/asan_report.cc +++ b/compiler-rt/lib/asan/asan_report.cc @@ -32,7 +32,7 @@ static char *error_message_buffer = nullptr; static uptr error_message_buffer_pos = 0; static BlockingMutex error_message_buf_mutex(LINKER_INITIALIZED); static const unsigned kAsanBuggyPcPoolSize = 25; -static __sanitizer::atomic_uint64_t AsanBuggyPcPool[kAsanBuggyPcPoolSize]; +static __sanitizer::atomic_uintptr_t AsanBuggyPcPool[kAsanBuggyPcPoolSize]; struct ReportData { uptr pc; @@ -1007,7 +1007,7 @@ void ReportMacMzReallocUnknown(uptr addr, uptr zone_ptr, const char *zone_name, static bool SuppressErrorReport(uptr pc) { if (!common_flags()->suppress_equal_pcs) return false; for (unsigned i = 0; i < kAsanBuggyPcPoolSize; i++) { - u64 cmp = atomic_load_relaxed(&AsanBuggyPcPool[i]); + uptr cmp = atomic_load_relaxed(&AsanBuggyPcPool[i]); if (cmp == 0 && atomic_compare_exchange_strong(&AsanBuggyPcPool[i], &cmp, pc, memory_order_relaxed)) return false; |

