Author: hbelusca Date: Sun Sep 28 22:35:05 2014 New Revision: 64383
URL: http://svn.reactos.org/svn/reactos?rev=64383&view=rev Log: [NTVDM]: Use the 0xCC (int 3) instruction as the memory fill byte.
Modified: trunk/reactos/subsystems/ntvdm/emulator.c
Modified: trunk/reactos/subsystems/ntvdm/emulator.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/ntvdm/emulator.c... ============================================================================== --- trunk/reactos/subsystems/ntvdm/emulator.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/ntvdm/emulator.c [iso-8859-1] Sun Sep 28 22:35:05 2014 @@ -549,8 +549,12 @@ 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 */