Author: hbelusca
Date: Tue Aug 4 19:46:52 2015
New Revision: 68596
URL: http://svn.reactos.org/svn/reactos?rev=68596&view=rev
Log:
[NTVDM]: By default, disable run-time DOS memory arena integrity checks (which was introduced along with UMB stuff in r68586).
Modified:
trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c
Modified: trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/mvdm/ntvdm/dos/…
==============================================================================
--- trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/mvdm/ntvdm/dos/dos32krnl/memory.c [iso-8859-1] Tue Aug 4 19:46:52 2015
@@ -26,6 +26,13 @@
#define FIRST_MCB_SEGMENT (SYSTEM_ENV_BLOCK + 0x200) // old value: 0x1000
#define USER_MEMORY_SIZE (0x9FFE - FIRST_MCB_SEGMENT)
+/*
+ * Activate this line if you want run-time DOS memory arena integrity validation
+ * (useful to know whether this is an application, or DOS kernel itself, which
+ * messes up the DOS memory arena).
+ */
+// #define DBG_MEMORY
+
/* PRIVATE VARIABLES **********************************************************/
/* PUBLIC VARIABLES ***********************************************************/
@@ -41,6 +48,7 @@
* This is a helper function to help us detecting
* when the DOS arena starts to become corrupted.
*/
+#ifdef DBG_MEMORY
static VOID DosMemValidate(VOID)
{
WORD PrevSegment, Segment = SysVars->FirstMcb;
@@ -68,6 +76,9 @@
Segment += CurrentMcb->Size + 1;
}
}
+#else
+#define DosMemValidate()
+#endif
static VOID DosCombineFreeBlocks(WORD StartBlock)
{
Author: tfaber
Date: Sun Aug 2 09:15:39 2015
New Revision: 68593
URL: http://svn.reactos.org/svn/reactos?rev=68593&view=rev
Log:
[NTOS:MM]
- Don't accept 64 bit PE files on x86 (will cause use of uninitialized variable ImageBase). CORE-9955
- Remove a pointless check in MmMapViewOfSection
Modified:
trunk/reactos/ntoskrnl/mm/section.c
Modified: trunk/reactos/ntoskrnl/mm/section.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/section.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/section.c [iso-8859-1] Sun Aug 2 09:15:39 2015
@@ -363,7 +363,9 @@
switch(piohOptHeader->Magic)
{
case IMAGE_NT_OPTIONAL_HDR32_MAGIC:
+#ifdef _WIN64
case IMAGE_NT_OPTIONAL_HDR64_MAGIC:
+#endif // _WIN64
break;
default:
@@ -4609,13 +4611,6 @@
{
MmUnlockAddressSpace(AddressSpace);
return STATUS_SECTION_PROTECTION;
- }
-
- if (ViewSize == NULL)
- {
- /* Following this pointer would lead to us to the dark side */
- /* What to do? Bugcheck? Return status? Do the mambo? */
- KeBugCheck(MEMORY_MANAGEMENT);
}
if (SectionOffset == NULL)