From 0fdb692a1fca5eee60707f081995c6b59613bd69 Mon Sep 17 00:00:00 2001 From: Amine Khaldi Date: Tue, 10 Sep 2013 21:57:52 +0000 Subject: [PATCH] [NTOSKRNL] * Return the proper status when we attempt to illegally commit non-ARM3 section. We hit this assert with some kernel32 winetests (mainly loader and virtual). Brought to you by Alex Ionescu. svn path=/trunk/; revision=60016 --- reactos/ntoskrnl/mm/ARM3/virtual.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/reactos/ntoskrnl/mm/ARM3/virtual.c b/reactos/ntoskrnl/mm/ARM3/virtual.c index fbda417c399..12075cc726a 100644 --- a/reactos/ntoskrnl/mm/ARM3/virtual.c +++ b/reactos/ntoskrnl/mm/ARM3/virtual.c @@ -4095,7 +4095,12 @@ NtAllocateVirtualMemory(IN HANDLE ProcessHandle, // Make sure this is an ARM3 section // MemoryArea = MmLocateMemoryAreaByAddress(AddressSpace, (PVOID)PAGE_ROUND_DOWN(PBaseAddress)); - ASSERT(MemoryArea->Type == MEMORY_AREA_OWNED_BY_ARM3); + if (MemoryArea->Type != MEMORY_AREA_OWNED_BY_ARM3) + { + DPRINT1("Illegal commit of non-ARM3 section!\n"); + Status = STATUS_ALREADY_COMMITTED; + goto FailPath; + } // Is this a previously reserved section being committed? If so, enter the // special section path