vm: reset stack memory after deallocation

This commit is contained in:
Eladash 2020-05-06 10:04:47 +03:00 committed by Ivan
parent 5c4b8e8dee
commit a6025df7de

View File

@ -444,7 +444,6 @@ namespace vm
if (!shm)
{
utils::memory_protect(g_base_addr + addr, size, utils::protection::rw);
std::memset(g_base_addr + addr, 0, size);
}
else if (shm->map_critical(g_base_addr + addr) != g_base_addr + addr || shm->map_critical(g_sudo_addr + addr) != g_sudo_addr + addr)
{
@ -595,6 +594,7 @@ namespace vm
if (!shm)
{
utils::memory_protect(g_base_addr + addr, size, utils::protection::no);
std::memset(g_sudo_addr + addr, 0, size);
}
else
{