diff options
author | Andreas Kling <kling@serenityos.org> | 2020-07-27 13:40:36 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-07-27 13:40:36 +0200 |
commit | 272dbb82ff22320259cbdd445138eedc48b76300 (patch) | |
tree | 68f0a491b64615dee72455f0d411f40ece4204fa /DevTools | |
parent | 31b94114c0921725317e678ab9a02f60001f3288 (diff) | |
download | serenity-272dbb82ff22320259cbdd445138eedc48b76300.zip |
UserspaceEmulator: Mark SimpleRegions as initialized up front for now
This prevents some false positives since the initial stack is expected
to be zero-initialized.
Diffstat (limited to 'DevTools')
-rw-r--r-- | DevTools/UserspaceEmulator/SimpleRegion.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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 <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() |