From 0f4f90cd04932d2f554ce97dd468a71fdc5b34fb Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 20 Mar 2020 22:37:42 -0400 Subject: arm_interface: Ensure ThreadContext is zero'd out. --- src/core/arm/arm_interface.h | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/core/arm') diff --git a/src/core/arm/arm_interface.h b/src/core/arm/arm_interface.h index 57eae839e..cb2e640e2 100644 --- a/src/core/arm/arm_interface.h +++ b/src/core/arm/arm_interface.h @@ -26,28 +26,28 @@ public: virtual ~ARM_Interface() = default; struct ThreadContext32 { - std::array cpu_registers; - u32 cpsr; - std::array padding; - std::array fprs; - u32 fpscr; - u32 fpexc; - u32 tpidr; + std::array cpu_registers{}; + u32 cpsr{}; + std::array padding{}; + std::array fprs{}; + u32 fpscr{}; + u32 fpexc{}; + u32 tpidr{}; }; // Internally within the kernel, it expects the AArch32 version of the // thread context to be 344 bytes in size. static_assert(sizeof(ThreadContext32) == 0x158); struct ThreadContext64 { - std::array cpu_registers; - u64 sp; - u64 pc; - u32 pstate; - std::array padding; - std::array vector_registers; - u32 fpcr; - u32 fpsr; - u64 tpidr; + std::array cpu_registers{}; + u64 sp{}; + u64 pc{}; + u32 pstate{}; + std::array padding{}; + std::array vector_registers{}; + u32 fpcr{}; + u32 fpsr{}; + u64 tpidr{}; }; // Internally within the kernel, it expects the AArch64 version of the // thread context to be 800 bytes in size. -- cgit v1.2.3