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&... ============================================================================== --- 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();