Skip to content

Commit 6fac342

Browse files
cferris1000Kostya Kortchinsky
authored andcommitted
[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
1 parent ab90ae6 commit 6fac342

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

compiler-rt/lib/scudo/standalone/tsd_shared.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -197,11 +197,11 @@ struct TSDRegistrySharedT {
197197
return CurrentTSD;
198198
}
199199

200-
atomic_u32 CurrentIndex;
201-
u32 NumberOfTSDs;
202-
u32 NumberOfCoPrimes;
203-
u32 CoPrimes[TSDsArraySize];
204-
bool Initialized;
200+
atomic_u32 CurrentIndex = {};
201+
u32 NumberOfTSDs = 0;
202+
u32 NumberOfCoPrimes = 0;
203+
u32 CoPrimes[TSDsArraySize] = {};
204+
bool Initialized = false;
205205
HybridMutex Mutex;
206206
HybridMutex MutexTSDs;
207207
TSD<Allocator> TSDs[TSDsArraySize];

0 commit comments

Comments
 (0)