Author: spetreolle
Date: Sun Oct 17 11:12:54 2010
New Revision: 49180
URL: http://svn.reactos.org/svn/reactos?rev=49180&view=rev
Log:
Patch by Roel Messiant :
Initialise PPB to zero.
The change from NtAllocateVirtualMemory to RtlAllocateHeap causes the memory to
be not automatically initialised to zero anymore.
Not every field of the PPB (for which the memory is allocated) gets explicitly
initialised, meaning this results in them having bogus values.
One of the now uninitialised fields is DebugFlags, which results in
DbgBreakPoint being called in NtProcessStartup. Simply ensuring the memory is
zeroed makes it all better again.
Modified:
trunk/reactos/lib/rtl/ppb.c
Modified: trunk/reactos/lib/rtl/ppb.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/ppb.c?rev=49180&r1…
==============================================================================
--- trunk/reactos/lib/rtl/ppb.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/ppb.c [iso-8859-1] Sun Oct 17 11:12:54 2010
@@ -119,7 +119,7 @@
Length += ALIGN(RuntimeData->MaximumLength, sizeof(ULONG));
/* Calculate the required block size */
- Param = RtlAllocateHeap(RtlGetProcessHeap(), 0, Length);
+ Param = RtlAllocateHeap(RtlGetProcessHeap(), HEAP_ZERO_MEMORY, Length);
if (!Param)
{
RtlReleasePebLock();
Author: sir_richard
Date: Sat Oct 16 21:04:50 2010
New Revision: 49178
URL: http://svn.reactos.org/svn/reactos?rev=49178&view=rev
Log:
[CSRSS]: Should use MEM_COMMIT | MEM_RESERVE, not just MEM_COMMIT when requesting a range of adress space that wasn't already reserved. This works in ReactOS because, well, no reason to explain why, but it wouldn't work on Windows or with a VAD-based kernel.
Modified:
trunk/reactos/subsystems/win32/csrss/csrsrv/init.c
Modified: trunk/reactos/subsystems/win32/csrss/csrsrv/init.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/csrss/csr…
==============================================================================
--- trunk/reactos/subsystems/win32/csrss/csrsrv/init.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/csrss/csrsrv/init.c [iso-8859-1] Sat Oct 16 21:04:50 2010
@@ -107,7 +107,7 @@
&BaseAddress,
0,
&ViewSize,
- MEM_COMMIT,
+ MEM_RESERVE | MEM_COMMIT,
PAGE_EXECUTE_READWRITE);
if (!NT_SUCCESS(Status))
{