[compiler-rt] 6fac342 - [scudo] Add initialization for TSDRegistrySharedT
Kostya Kortchinsky via llvm-commits
llvm-commits at lists.llvm.org
Wed May 5 19:01:35 PDT 2021
Author: Christopher Ferris
Date: 2021-05-05T19:00:54-07:00
New Revision: 6fac34251d015b2f196dfb46dd015a914b8d6340
URL: https://github.com/llvm/llvm-project/commit/6fac34251d015b2f196dfb46dd015a914b8d6340
DIFF: https://github.com/llvm/llvm-project/commit/6fac34251d015b2f196dfb46dd015a914b8d6340.diff
LOG: [scudo] Add initialization for TSDRegistrySharedT
Fixes compilation on Android which has a TSDSharedRegistry object in the config.
Reviewed By: cryptoad, vitalybuka
Differential Revision: https://reviews.llvm.org/D101951
Added:
Modified:
compiler-rt/lib/scudo/standalone/tsd_shared.h
Removed:
################################################################################
diff --git a/compiler-rt/lib/scudo/standalone/tsd_shared.h b/compiler-rt/lib/scudo/standalone/tsd_shared.h
index b9b6f38054a37..afe3623ce404e 100644
--- a/compiler-rt/lib/scudo/standalone/tsd_shared.h
+++ b/compiler-rt/lib/scudo/standalone/tsd_shared.h
@@ -197,11 +197,11 @@ struct TSDRegistrySharedT {
return CurrentTSD;
}
- atomic_u32 CurrentIndex;
- u32 NumberOfTSDs;
- u32 NumberOfCoPrimes;
- u32 CoPrimes[TSDsArraySize];
- bool Initialized;
+ atomic_u32 CurrentIndex = {};
+ u32 NumberOfTSDs = 0;
+ u32 NumberOfCoPrimes = 0;
+ u32 CoPrimes[TSDsArraySize] = {};
+ bool Initialized = false;
HybridMutex Mutex;
HybridMutex MutexTSDs;
TSD<Allocator> TSDs[TSDsArraySize];
More information about the llvm-commits
mailing list