UserspaceEmulator: Mark SimpleRegions as initialized up front for now

This prevents some false positives since the initial stack is expected
to be zero-initialized.
This commit is contained in:
Andreas Kling 2020-07-27 13:40:36 +02:00
parent 31b94114c0
commit 272dbb82ff
Notes: sideshowbarker 2024-07-19 04:34:14 +09:00

View file

@ -25,6 +25,7 @@
*/
#include "SimpleRegion.h"
#include <string.h>
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()