[compiler-rt] r227196 - Revert r226440.
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Tue Jan 27 07:06:54 PST 2015
Author: eugenis
Date: Tue Jan 27 09:06:54 2015
New Revision: 227196
URL: http://llvm.org/viewvc/llvm-project?rev=227196&view=rev
Log:
Revert r226440.
It was fixed the right way in r227195.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc?rev=227196&r1=227195&r2=227196&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc Tue Jan 27 09:06:54 2015
@@ -156,8 +156,7 @@ void CoverageData::Init() {
}
void CoverageData::Enable() {
- if (pc_array)
- return;
+ CHECK_EQ(pc_array, nullptr);
pc_array = reinterpret_cast<uptr *>(
MmapNoReserveOrDie(sizeof(uptr) * kPcArrayMaxSize, "CovInit"));
atomic_store(&pc_array_index, 0, memory_order_relaxed);
@@ -183,7 +182,6 @@ void CoverageData::Enable() {
}
void CoverageData::InitializeGuardArray(s32 *guards) {
- Enable(); // Make sure coverage is enabled at this point.
s32 n = guards[0];
for (s32 j = 1; j <= n; j++) {
uptr idx = atomic_fetch_add(&pc_array_index, 1, memory_order_relaxed);
More information about the llvm-commits
mailing list