From 272dbb82ff22320259cbdd445138eedc48b76300 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 27 Jul 2020 13:40:36 +0200 Subject: UserspaceEmulator: Mark SimpleRegions as initialized up front for now This prevents some false positives since the initial stack is expected to be zero-initialized. --- DevTools/UserspaceEmulator/SimpleRegion.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'DevTools') diff --git a/DevTools/UserspaceEmulator/SimpleRegion.cpp b/DevTools/UserspaceEmulator/SimpleRegion.cpp index 5e74971f5c..cf5d2ee88c 100644 --- a/DevTools/UserspaceEmulator/SimpleRegion.cpp +++ b/DevTools/UserspaceEmulator/SimpleRegion.cpp @@ -25,6 +25,7 @@ */ #include "SimpleRegion.h" +#include namespace UserspaceEmulator { @@ -32,7 +33,8 @@ SimpleRegion::SimpleRegion(u32 base, u32 size) : Region(base, size) { m_data = (u8*)calloc(1, size); - m_shadow_data = (u8*)calloc(1, size); + m_shadow_data = (u8*)malloc(size); + memset(m_shadow_data, 1, size); } SimpleRegion::~SimpleRegion() -- cgit v1.2.3