Author: jgardou
Date: Tue Apr 9 23:27:35 2013
New Revision: 58728
URL: http://svn.reactos.org/svn/reactos?rev=58728&view=rev
Log:
[NTDLL_APITEST]
* Enable the test for committing regions larger than the section again
* Test behaviour of NtFreeVirtualMemory(MEM_DECOMMIT) for section-backed virtual memory
Modified:
trunk/rostests/apitests/ntdll/NtMapViewOfSection.c
Modified: trunk/rostests/apitests/ntdll/NtMapViewOfSection.c
URL: http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/ntdll/NtMapViewO…
==============================================================================
--- trunk/rostests/apitests/ntdll/NtMapViewOfSection.c [iso-8859-1] (original)
+++ trunk/rostests/apitests/ntdll/NtMapViewOfSection.c [iso-8859-1] Tue Apr 9 23:27:35 2013
@@ -103,9 +103,11 @@
MEM_COMMIT,
PAGE_READWRITE);
ok(NT_SUCCESS(Status), "NtAllocateVirtualMemory failed with Status %lx\n", Status);
-#ifndef CORE_7065_FIXED
- ok(0, "Committing a range larger than the section crashes. See CORE-7065\n");
-#else
+ Status = NtFreeVirtualMemory(NtCurrentProcess(),
+ &BaseAddress,
+ &ViewSize,
+ MEM_DECOMMIT);
+ ok(Status == STATUS_UNABLE_TO_DELETE_SECTION, "NtFreeVirtualMemory returned wrong Status %lx\n", Status);
/* Try to commit a range larger than the section */
BaseAddress = (PVOID)0x30000000;
ViewSize = 0x3000;
@@ -117,7 +119,7 @@
PAGE_READWRITE);
ok(Status == STATUS_CONFLICTING_ADDRESSES,
"NtAllocateVirtualMemory failed with wrong Status %lx\n", Status);
-#endif
+
/* Try to commit a page after the section */
BaseAddress = (PVOID)0x30002000;
ViewSize = 0x1000;
Author: jgardou
Date: Tue Apr 9 23:24:50 2013
New Revision: 58727
URL: http://svn.reactos.org/svn/reactos?rev=58727&view=rev
Log:
[NTOS/MM]
- Fix check for address range fitting the VAD when commiting memory
CORE-7065 #comment Should be fixed with r58627 #resolve
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/virtual.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/virtual.c…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/virtual.c [iso-8859-1] Tue Apr 9 23:24:50 2013
@@ -4081,7 +4081,7 @@
//
// Make sure that this address range actually fits within the VAD for it
//
- if (((StartingAddress >> PAGE_SHIFT) < FoundVad->StartingVpn) &&
+ if (((StartingAddress >> PAGE_SHIFT) < FoundVad->StartingVpn) ||
((EndingAddress >> PAGE_SHIFT) > FoundVad->EndingVpn))
{
DPRINT1("Address range does not fit into the VAD\n");