mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-27 01:50:24 +00:00
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:
parent
31b94114c0
commit
272dbb82ff
Notes:
sideshowbarker
2024-07-19 04:34:14 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/272dbb82ff2
1 changed files with 3 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue