Commit ab28825a authored by Bernhard Übelacker's avatar Bernhard Übelacker Committed by Alexandre Julliard

ntdll: Fix structure layout in RtlQueryProcessDebugInformation for 64-bit.

This is to avoid crash in Process Explorer 17.05. Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56235
parent 976e715b
......@@ -77,8 +77,8 @@ static void dump_DEBUG_BUFFER(const DEBUG_BUFFER *iBuf)
TRACE( "EventPairHandle:%p\n", iBuf->EventPairHandle);
TRACE( "RemoteThreadHandle:%p\n", iBuf->RemoteThreadHandle);
TRACE( "InfoClassMask:%lx\n", iBuf->InfoClassMask);
TRACE( "SizeOfInfo:%ld\n", iBuf->SizeOfInfo);
TRACE( "AllocatedSize:%ld\n", iBuf->AllocatedSize);
TRACE( "SizeOfInfo:%Iu\n", iBuf->SizeOfInfo);
TRACE( "AllocatedSize:%Iu\n", iBuf->AllocatedSize);
TRACE( "SectionSize:%ld\n", iBuf->SectionSize);
TRACE( "BackTraceInfo:%p\n", iBuf->BackTraceInformation);
dump_DEBUG_MODULE_INFORMATION(iBuf->ModuleInformation);
......
......@@ -157,6 +157,7 @@ static void test_RtlQueryProcessDebugInformation(void)
DEBUG_BUFFER *buffer;
NTSTATUS status;
/* PDI_HEAPS | PDI_HEAP_BLOCKS */
buffer = RtlCreateQueryDebugBuffer( 0, 0 );
ok( buffer != NULL, "RtlCreateQueryDebugBuffer returned NULL" );
......@@ -165,6 +166,20 @@ static void test_RtlQueryProcessDebugInformation(void)
status = RtlQueryProcessDebugInformation( GetCurrentProcessId(), PDI_HEAPS | PDI_HEAP_BLOCKS, buffer );
ok( !status, "RtlQueryProcessDebugInformation returned %lx\n", status );
ok( buffer->InfoClassMask == (PDI_HEAPS | PDI_HEAP_BLOCKS), "unexpected InfoClassMask %ld\n", buffer->InfoClassMask);
ok( buffer->HeapInformation != NULL, "unexpected HeapInformation %p\n", buffer->HeapInformation);
status = RtlDestroyQueryDebugBuffer( buffer );
ok( !status, "RtlDestroyQueryDebugBuffer returned %lx\n", status );
/* PDI_MODULES */
buffer = RtlCreateQueryDebugBuffer( 0, 0 );
ok( buffer != NULL, "RtlCreateQueryDebugBuffer returned NULL" );
status = RtlQueryProcessDebugInformation( GetCurrentProcessId(), PDI_MODULES, buffer );
ok( !status, "RtlQueryProcessDebugInformation returned %lx\n", status );
ok( buffer->InfoClassMask == PDI_MODULES, "unexpected InfoClassMask %ld\n", buffer->InfoClassMask);
ok( buffer->ModuleInformation != NULL, "unexpected ModuleInformation %p\n", buffer->ModuleInformation);
status = RtlDestroyQueryDebugBuffer( buffer );
ok( !status, "RtlDestroyQueryDebugBuffer returned %lx\n", status );
......
......@@ -3040,11 +3040,11 @@ typedef struct _DEBUG_BUFFER {
PVOID RemoteSectionBase;
ULONG SectionBaseDelta;
HANDLE EventPairHandle;
ULONG Unknown[2];
SIZE_T Unknown[2];
HANDLE RemoteThreadHandle;
ULONG InfoClassMask;
ULONG SizeOfInfo;
ULONG AllocatedSize;
SIZE_T SizeOfInfo;
SIZE_T AllocatedSize;
ULONG SectionSize;
PVOID ModuleInformation;
PVOID BackTraceInformation;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment