From 42434d04d0757d00dcf34503fe6f78e3748a5354 Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Tue, 7 Nov 2023 18:32:16 +0100 Subject: [PATCH] c11_atomics: fix uninitialized member accesses (#1819) Initialize the `_memoryOrder` and `_memoryScope` members to avoid `CBasicTestMemOrderScope::MaxHostThreads()` accessing uninitialized data. Signed-off-by: Sven van Haastregt --- test_conformance/c11_atomics/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_conformance/c11_atomics/common.h b/test_conformance/c11_atomics/common.h index 37c37e87..76d1fe27 100644 --- a/test_conformance/c11_atomics/common.h +++ b/test_conformance/c11_atomics/common.h @@ -644,8 +644,8 @@ public: } private: - TExplicitMemoryOrderType _memoryOrder; - TExplicitMemoryScopeType _memoryScope; + TExplicitMemoryOrderType _memoryOrder = MEMORY_ORDER_EMPTY; + TExplicitMemoryScopeType _memoryScope = MEMORY_SCOPE_EMPTY; }; template