From: Hermès Bélusca-Maïto Date: Sun, 28 Sep 2014 22:35:05 +0000 (+0000) Subject: [NTVDM]: Use the 0xCC (int 3) instruction as the memory fill byte. X-Git-Tag: backups/0.3.17@66124~360 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=90d370dbb659af5bc9d7e99a4da0643e56ab4009 [NTVDM]: Use the 0xCC (int 3) instruction as the memory fill byte. svn path=/trunk/; revision=64383 --- diff --git a/reactos/subsystems/ntvdm/emulator.c b/reactos/subsystems/ntvdm/emulator.c index 18121b0159e..06d1e234676 100644 --- a/reactos/subsystems/ntvdm/emulator.c +++ b/reactos/subsystems/ntvdm/emulator.c @@ -549,8 +549,12 @@ BOOLEAN EmulatorInitialize(HANDLE ConsoleInput, HANDLE ConsoleOutput) wprintf(L"FATAL: Failed to allocate VDM memory.\n"); return FALSE; } - // For diagnostics purposes!! - RtlFillMemory(BaseAddress, MAX_ADDRESS, 0xFF); + /* + * For diagnostics purposes, we fill the memory with INT 0x03 codes + * so that if a program wants to execute random code in memory, we can + * retrieve the exact CS:IP where the problem happens. + */ + RtlFillMemory(BaseAddress, MAX_ADDRESS, 0xCC); /* Initialize I/O ports */ /* Initialize RAM */