[scudo] Use require_constant_initialization
Attribute guaranties safe static initialization of globals.
Reviewed By: hctim
Differential Revision: https://reviews.llvm.org/D101514
GitOrigin-RevId: d56ef8523c71b2a9b1629265be276b3871509e7b
Change-Id: I1b26c4c5872be29ec58c52c505a15fdcadc5e428
diff --git a/standalone/mutex.h b/standalone/mutex.h
index d6e6a5b..a654d35 100644
--- a/standalone/mutex.h
+++ b/standalone/mutex.h
@@ -48,9 +48,9 @@
static constexpr u8 NumberOfYields = 8U;
#if SCUDO_LINUX
- atomic_u32 M;
+ atomic_u32 M = {};
#elif SCUDO_FUCHSIA
- sync_mutex_t M;
+ sync_mutex_t M = {};
#endif
void lockSlow();