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.

svn path=/trunk/; revision=49180
This commit is contained in:
Sylvain Petreolle 2010-10-17 11:12:54 +00:00
parent 49c30a8a6d
commit f33d927f43

View file

@ -119,7 +119,7 @@ RtlCreateProcessParameters(PRTL_USER_PROCESS_PARAMETERS *ProcessParameters,
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();