mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-11-21 16:46:54 -08:00
Removed several patches (accepeted upstream).
This commit is contained in:
parent
c501f9328f
commit
1637f56db9
@ -39,10 +39,9 @@ Wine. All those differences are also documented on the
|
||||
Included bug fixes and improvements
|
||||
===================================
|
||||
|
||||
**Bugfixes and features included in the next upcoming release [19]:**
|
||||
**Bugfixes and features included in the next upcoming release [17]:**
|
||||
|
||||
* Add stub for NtSetLdtEntries/ZwSetLdtEntries ([Wine Bug #26268](https://bugs.winehq.org/show_bug.cgi?id=26268))
|
||||
* Allow NULL pointer for optional arguments of D3DXIntersectTri ([Wine Bug #35133](https://bugs.winehq.org/show_bug.cgi?id=35133))
|
||||
* Allow selection of audio device for PulseAudio backend
|
||||
* Avoid crashing when broken app tries to release surface although refcount is zero ([Wine Bug #18477](https://bugs.winehq.org/show_bug.cgi?id=18477))
|
||||
* Avoid sending window messages in FindWindowExW ([Wine Bug #27282](https://bugs.winehq.org/show_bug.cgi?id=27282))
|
||||
@ -53,7 +52,6 @@ Included bug fixes and improvements
|
||||
* Fix crash of Trine Demo on start ([Wine Bug #19231](https://bugs.winehq.org/show_bug.cgi?id=19231))
|
||||
* Fix crash of winedevice when relocation entry crosses page boundary ([Wine Bug #28254](https://bugs.winehq.org/show_bug.cgi?id=28254))
|
||||
* Fix handling of invert_y in DrawTextExW ([Wine Bug #22109](https://bugs.winehq.org/show_bug.cgi?id=22109))
|
||||
* Fix implementation of K32GetPerformanceInfo ([Wine Bug #37512](https://bugs.winehq.org/show_bug.cgi?id=37512))
|
||||
* Fix texture corruption in CSI: Fatal Conspiracy ([Wine Bug #33768](https://bugs.winehq.org/show_bug.cgi?id=33768))
|
||||
* MSVCRT crashes when NULL is passed as string to atof or strtod ([Wine Bug #32550](https://bugs.winehq.org/show_bug.cgi?id=32550))
|
||||
* Return correct values for GetThreadTimes function ([Wine Bug #20230](https://bugs.winehq.org/show_bug.cgi?id=20230))
|
||||
|
2
debian/changelog
vendored
2
debian/changelog
vendored
@ -32,6 +32,8 @@ wine-compholio (1.7.31) UNRELEASED; urgency=low
|
||||
* Removed patch with additional tests for MsgWaitForMultipleObjectsEx (accepted upstream).
|
||||
* Removed patches for D3DXCreatePolygon (accepted upstream).
|
||||
* Removed patches vor vectored continue handler stubs (accepted upstream).
|
||||
* Removed patches for K32GetPerformanceInfo (accepted upstream).
|
||||
* Removed patch for D3DXIntersectTri (accepted upstream).
|
||||
* Partially removed patches for UTF-7 tests (accepted upstream).
|
||||
* Partially removed patches for WS_SO_CONNECT_TIME (accepted upstream).
|
||||
-- Sebastian Lackner <sebastian@fds-team.de> Mon, 03 Nov 2014 20:10:04 +0100
|
||||
|
@ -31,7 +31,6 @@ PATCHLIST := \
|
||||
d3dx9_36-DXTn.ok \
|
||||
d3dx9_36-Filter_Warnings.ok \
|
||||
d3dx9_36-GetShaderSemantics.ok \
|
||||
d3dx9_36-IntersectTri.ok \
|
||||
d3dx9_36-Texture_Align.ok \
|
||||
d3dx9_36-UpdateSkinnedMesh.ok \
|
||||
dbghelp-KdHelp.ok \
|
||||
@ -47,7 +46,6 @@ PATCHLIST := \
|
||||
kernel32-GetNumaProcessorNode.ok \
|
||||
kernel32-GetSystemTimes.ok \
|
||||
kernel32-GetVolumePathName.ok \
|
||||
kernel32-K32GetPerformanceInfo.ok \
|
||||
kernel32-Named_Pipe.ok \
|
||||
kernel32-UTF7_Support.ok \
|
||||
libs-Unicode_Collation.ok \
|
||||
@ -403,24 +401,6 @@ d3dx9_36-GetShaderSemantics.ok:
|
||||
echo '+ { "d3dx9_36-GetShaderSemantics", "Christian Costa", "Implement D3DXGetShaderInputSemantics." },'; \
|
||||
) > d3dx9_36-GetShaderSemantics.ok
|
||||
|
||||
# Patchset d3dx9_36-IntersectTri
|
||||
# |
|
||||
# | Included patches:
|
||||
# | * Allow NULL pointer for optional arguments of D3DXIntersectTri. [by Sebastian Lackner]
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#35133] Allow NULL pointer for optional arguments of D3DXIntersectTri
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/d3dx9_36/mesh.c, dlls/d3dx9_36/tests/mesh.c
|
||||
# |
|
||||
.INTERMEDIATE: d3dx9_36-IntersectTri.ok
|
||||
d3dx9_36-IntersectTri.ok:
|
||||
$(call APPLY_FILE,d3dx9_36-IntersectTri/0001-d3dx9_36-Allow-NULL-pointer-for-optional-arguments-o.patch)
|
||||
@( \
|
||||
echo '+ { "d3dx9_36-IntersectTri", "Sebastian Lackner", "Allow NULL pointer for optional arguments of D3DXIntersectTri." },'; \
|
||||
) > d3dx9_36-IntersectTri.ok
|
||||
|
||||
# Patchset d3dx9_36-Texture_Align
|
||||
# |
|
||||
# | Included patches:
|
||||
@ -698,24 +678,6 @@ kernel32-GetVolumePathName.ok:
|
||||
echo '+ { "kernel32-GetVolumePathName", "Erich E. Hoover", "Implement GetVolumePathName." },'; \
|
||||
) > kernel32-GetVolumePathName.ok
|
||||
|
||||
# Patchset kernel32-K32GetPerformanceInfo
|
||||
# |
|
||||
# | Included patches:
|
||||
# | * Fix implementation of K32GetPerformanceInfo. [by Sebastian Lackner]
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
# | * [#37512] Fix implementation of K32GetPerformanceInfo
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/kernel32/cpu.c, dlls/psapi/tests/psapi_main.c
|
||||
# |
|
||||
.INTERMEDIATE: kernel32-K32GetPerformanceInfo.ok
|
||||
kernel32-K32GetPerformanceInfo.ok:
|
||||
$(call APPLY_FILE,kernel32-K32GetPerformanceInfo/0001-kernel32-Fix-implementation-of-K32GetPerformanceInfo.patch)
|
||||
@( \
|
||||
echo '+ { "kernel32-K32GetPerformanceInfo", "Sebastian Lackner", "Fix implementation of K32GetPerformanceInfo." },'; \
|
||||
) > kernel32-K32GetPerformanceInfo.ok
|
||||
|
||||
# Patchset kernel32-Named_Pipe
|
||||
# |
|
||||
# | Included patches:
|
||||
|
@ -1,65 +0,0 @@
|
||||
From f287d54f5a2a1e874aafb2fb5ce442113e805afe Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sat, 8 Nov 2014 19:29:53 +0100
|
||||
Subject: d3dx9_36: Allow NULL pointer for optional arguments of
|
||||
D3DXIntersectTri.
|
||||
|
||||
---
|
||||
dlls/d3dx9_36/mesh.c | 6 +++---
|
||||
dlls/d3dx9_36/tests/mesh.c | 9 +++++++++
|
||||
2 files changed, 12 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/dlls/d3dx9_36/mesh.c b/dlls/d3dx9_36/mesh.c
|
||||
index aecb45d..1eff2d3 100644
|
||||
--- a/dlls/d3dx9_36/mesh.c
|
||||
+++ b/dlls/d3dx9_36/mesh.c
|
||||
@@ -2407,9 +2407,9 @@ BOOL WINAPI D3DXIntersectTri(const D3DXVECTOR3 *p0, const D3DXVECTOR3 *p1, const
|
||||
D3DXVec4Transform(&vec, &vec, &m);
|
||||
if ( (vec.x >= 0.0f) && (vec.y >= 0.0f) && (vec.x + vec.y <= 1.0f) && (vec.z >= 0.0f) )
|
||||
{
|
||||
- *pu = vec.x;
|
||||
- *pv = vec.y;
|
||||
- *pdist = fabsf( vec.z );
|
||||
+ if (pu) *pu = vec.x;
|
||||
+ if (pv) *pv = vec.y;
|
||||
+ if (pdist) *pdist = fabsf( vec.z );
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
|
||||
index 17c5d9c..4e45b25 100644
|
||||
--- a/dlls/d3dx9_36/tests/mesh.c
|
||||
+++ b/dlls/d3dx9_36/tests/mesh.c
|
||||
@@ -1104,6 +1104,9 @@ static void D3DXIntersectTriTest(void)
|
||||
ok( compare(exp_v,got_v), "Expected v = %f, got %f\n",exp_v,got_v);
|
||||
ok( compare(exp_dist,got_dist), "Expected distance = %f, got %f\n",exp_dist,got_dist);
|
||||
|
||||
+ got_res = D3DXIntersectTri(&vertex[0], &vertex[1], &vertex[2], &position, &ray, NULL, NULL, NULL);
|
||||
+ ok(got_res == exp_res, "Expected result = %d, got %d\n", exp_res, got_res);
|
||||
+
|
||||
/*Only positive ray is taken in account*/
|
||||
|
||||
vertex[0].x = 1.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f;
|
||||
@@ -1119,6 +1122,9 @@ static void D3DXIntersectTriTest(void)
|
||||
got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist);
|
||||
ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res);
|
||||
|
||||
+ got_res = D3DXIntersectTri(&vertex[0], &vertex[1], &vertex[2], &position, &ray, NULL, NULL, NULL);
|
||||
+ ok(got_res == exp_res, "Expected result = %d, got %d\n", exp_res, got_res);
|
||||
+
|
||||
/*Intersection between ray and triangle in a same plane is considered as empty*/
|
||||
|
||||
vertex[0].x = 4.0f; vertex[0].y = 0.0f; vertex[0].z = 0.0f;
|
||||
@@ -1133,6 +1139,9 @@ static void D3DXIntersectTriTest(void)
|
||||
|
||||
got_res = D3DXIntersectTri(&vertex[0],&vertex[1],&vertex[2],&position,&ray,&got_u,&got_v,&got_dist);
|
||||
ok( got_res == exp_res, "Expected result = %d, got %d\n",exp_res,got_res);
|
||||
+
|
||||
+ got_res = D3DXIntersectTri(&vertex[0], &vertex[1], &vertex[2], &position, &ray, NULL, NULL, NULL);
|
||||
+ ok(got_res == exp_res, "Expected result = %d, got %d\n", exp_res, got_res);
|
||||
}
|
||||
|
||||
static void D3DXCreateMeshTest(void)
|
||||
--
|
||||
2.1.3
|
||||
|
@ -1,4 +0,0 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Allow NULL pointer for optional arguments of D3DXIntersectTri.
|
||||
Revision: 1
|
||||
Fixes: [35133] Allow NULL pointer for optional arguments of D3DXIntersectTri
|
@ -1,284 +0,0 @@
|
||||
From 6d0a5dfb47d6f38a7eec61f54b6e95214df3083d Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 13 Nov 2014 23:06:15 +0100
|
||||
Subject: kernel32: Fix implementation of K32GetPerformanceInfo.
|
||||
|
||||
---
|
||||
dlls/kernel32/cpu.c | 72 +++++++++++++++++++++-
|
||||
dlls/psapi/tests/psapi_main.c | 137 +++++++++++++++++++++++++++++++++++++++++-
|
||||
2 files changed, 207 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/dlls/kernel32/cpu.c b/dlls/kernel32/cpu.c
|
||||
index 0ebf8f3..56cbfd2 100644
|
||||
--- a/dlls/kernel32/cpu.c
|
||||
+++ b/dlls/kernel32/cpu.c
|
||||
@@ -217,10 +217,63 @@ BOOL WINAPI IsProcessorFeaturePresent (
|
||||
BOOL WINAPI K32GetPerformanceInfo(PPERFORMANCE_INFORMATION info, DWORD size)
|
||||
{
|
||||
+ union
|
||||
+ {
|
||||
+ SYSTEM_PERFORMANCE_INFORMATION performance;
|
||||
+ SYSTEM_BASIC_INFORMATION basic;
|
||||
+ } sysinfo;
|
||||
+ SYSTEM_PROCESS_INFORMATION *process_info = NULL, *spi;
|
||||
+ DWORD process_info_size;
|
||||
NTSTATUS status;
|
||||
|
||||
TRACE( "(%p, %d)\n", info, size );
|
||||
|
||||
- status = NtQuerySystemInformation( SystemPerformanceInformation, info, size, NULL );
|
||||
+ if (size < sizeof(*info))
|
||||
+ {
|
||||
+ SetLastError( ERROR_BAD_LENGTH );
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+
|
||||
+ info->cb = sizeof(*info);
|
||||
+
|
||||
+ /* SYSTEM_PERFORMANCE_INFORMATION */
|
||||
+ status = NtQuerySystemInformation( SystemPerformanceInformation, &sysinfo.performance, sizeof(sysinfo.performance), NULL );
|
||||
+ if (status)
|
||||
+ {
|
||||
+ SetLastError( RtlNtStatusToDosError( status ) );
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ info->CommitTotal = sysinfo.performance.TotalCommittedPages;
|
||||
+ info->CommitLimit = sysinfo.performance.TotalCommitLimit;
|
||||
+ info->CommitPeak = sysinfo.performance.PeakCommitment;
|
||||
+ info->PhysicalAvailable = sysinfo.performance.AvailablePages;
|
||||
+ info->SystemCache = 0; /* FIXME */
|
||||
+ info->KernelTotal = sysinfo.performance.PagedPoolUsage + sysinfo.performance.NonPagedPoolUsage;
|
||||
+ info->KernelPaged = sysinfo.performance.PagedPoolUsage;
|
||||
+ info->KernelNonpaged = sysinfo.performance.NonPagedPoolUsage;
|
||||
+
|
||||
+ /* SYSTEM_BASIC_INFORMATION */
|
||||
+ status = NtQuerySystemInformation( SystemBasicInformation, &sysinfo.basic, sizeof(sysinfo.basic), NULL );
|
||||
+ if (status)
|
||||
+ {
|
||||
+ SetLastError( RtlNtStatusToDosError( status ) );
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ info->PhysicalTotal = sysinfo.basic.MmNumberOfPhysicalPages;
|
||||
+ info->PageSize = sysinfo.basic.PageSize;
|
||||
|
||||
+ /* SYSTEM_PROCESS_INFORMATION */
|
||||
+ status = NtQuerySystemInformation( SystemProcessInformation, NULL, 0, &process_info_size );
|
||||
+ while (status == STATUS_INFO_LENGTH_MISMATCH)
|
||||
+ {
|
||||
+ process_info = HeapAlloc( GetProcessHeap(), 0, process_info_size );
|
||||
+ if (!process_info)
|
||||
+ {
|
||||
+ SetLastError( ERROR_OUTOFMEMORY );
|
||||
+ return FALSE;
|
||||
+ }
|
||||
+ status = NtQuerySystemInformation( SystemProcessInformation, process_info, process_info_size, &process_info_size );
|
||||
+ if (!status) break;
|
||||
+ HeapFree( GetProcessHeap(), 0, process_info );
|
||||
+ }
|
||||
if (status)
|
||||
{
|
||||
@@ -228,4 +281,21 @@ BOOL WINAPI K32GetPerformanceInfo(PPERFORMANCE_INFORMATION info, DWORD size)
|
||||
return FALSE;
|
||||
}
|
||||
+
|
||||
+ info->HandleCount = 0;
|
||||
+ info->ProcessCount = 0;
|
||||
+ info->ThreadCount = 0;
|
||||
+
|
||||
+ if (process_info)
|
||||
+ {
|
||||
+ for (spi = process_info;; spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset))
|
||||
+ {
|
||||
+ info->ProcessCount++;
|
||||
+ info->HandleCount += spi->HandleCount;
|
||||
+ info->ThreadCount += spi->dwThreadCount;
|
||||
+ if (spi->NextEntryOffset == 0) break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ HeapFree( GetProcessHeap(), 0, process_info );
|
||||
return TRUE;
|
||||
}
|
||||
diff --git a/dlls/psapi/tests/psapi_main.c b/dlls/psapi/tests/psapi_main.c
|
||||
index 62d4f5c..7fa5d26 100644
|
||||
--- a/dlls/psapi/tests/psapi_main.c
|
||||
+++ b/dlls/psapi/tests/psapi_main.c
|
||||
@@ -53,14 +53,16 @@ static DWORD (WINAPI *pGetModuleFileNameExW)(HANDLE, HMODULE, LPWSTR, DWORD);
|
||||
static BOOL (WINAPI *pGetModuleInformation)(HANDLE, HMODULE, LPMODULEINFO, DWORD);
|
||||
static DWORD (WINAPI *pGetMappedFileNameA)(HANDLE, LPVOID, LPSTR, DWORD);
|
||||
static DWORD (WINAPI *pGetMappedFileNameW)(HANDLE, LPVOID, LPWSTR, DWORD);
|
||||
+static BOOL (WINAPI *pGetPerformanceInfo)(PPERFORMANCE_INFORMATION, DWORD);
|
||||
static DWORD (WINAPI *pGetProcessImageFileNameA)(HANDLE, LPSTR, DWORD);
|
||||
static DWORD (WINAPI *pGetProcessImageFileNameW)(HANDLE, LPWSTR, DWORD);
|
||||
static BOOL (WINAPI *pGetProcessMemoryInfo)(HANDLE, PPROCESS_MEMORY_COUNTERS, DWORD);
|
||||
static BOOL (WINAPI *pGetWsChanges)(HANDLE, PPSAPI_WS_WATCH_INFORMATION, DWORD);
|
||||
static BOOL (WINAPI *pInitializeProcessForWsWatch)(HANDLE);
|
||||
static BOOL (WINAPI *pQueryWorkingSet)(HANDLE, PVOID, DWORD);
|
||||
+static NTSTATUS (WINAPI *pNtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS, PVOID, ULONG, PULONG);
|
||||
static NTSTATUS (WINAPI *pNtQueryVirtualMemory)(HANDLE, LPCVOID, ULONG, PVOID, SIZE_T, SIZE_T *);
|
||||
-
|
||||
+
|
||||
static BOOL InitFunctionPtrs(HMODULE hpsapi)
|
||||
{
|
||||
PSAPI_GET_PROC(EmptyWorkingSet);
|
||||
@@ -77,10 +79,13 @@ static BOOL InitFunctionPtrs(HMODULE hpsapi)
|
||||
PSAPI_GET_PROC(InitializeProcessForWsWatch);
|
||||
PSAPI_GET_PROC(QueryWorkingSet);
|
||||
/* GetProcessImageFileName is not exported on NT4 */
|
||||
+ pGetPerformanceInfo =
|
||||
+ (void *)GetProcAddress(hpsapi, "GetPerformanceInfo");
|
||||
pGetProcessImageFileNameA =
|
||||
(void *)GetProcAddress(hpsapi, "GetProcessImageFileNameA");
|
||||
pGetProcessImageFileNameW =
|
||||
(void *)GetProcAddress(hpsapi, "GetProcessImageFileNameW");
|
||||
+ pNtQuerySystemInformation = (void *)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQuerySystemInformation");
|
||||
pNtQueryVirtualMemory = (void *)GetProcAddress(GetModuleHandleA("ntdll.dll"), "NtQueryVirtualMemory");
|
||||
return TRUE;
|
||||
}
|
||||
@@ -184,6 +189,135 @@ static void test_GetModuleInformation(void)
|
||||
ok(info.lpBaseOfDll == hMod, "lpBaseOfDll=%p hMod=%p\n", info.lpBaseOfDll, hMod);
|
||||
}
|
||||
|
||||
+static void test_GetPerformanceInfo(void)
|
||||
+{
|
||||
+ PERFORMANCE_INFORMATION info;
|
||||
+ NTSTATUS status;
|
||||
+ DWORD size;
|
||||
+ BOOL ret;
|
||||
+
|
||||
+ if (!pGetPerformanceInfo)
|
||||
+ {
|
||||
+ win_skip("GetPerformanceInfo not available, skipping tests\n");
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pGetPerformanceInfo(&info, sizeof(info)-1);
|
||||
+ ok(!ret, "GetPerformanceInfo unexpectedly succeeded\n");
|
||||
+ ok(GetLastError() == ERROR_BAD_LENGTH, "expected error=ERROR_BAD_LENGTH but got %d\n", GetLastError());
|
||||
+
|
||||
+ SetLastError(0xdeadbeef);
|
||||
+ ret = pGetPerformanceInfo(&info, sizeof(info));
|
||||
+ ok(ret, "GetPerformanceInfo failed with %d\n", GetLastError());
|
||||
+ ok(info.cb == sizeof(PERFORMANCE_INFORMATION), "expected info.cb=%d but got %d\n", sizeof(PERFORMANCE_INFORMATION), info.cb);
|
||||
+
|
||||
+ /* verify content of the structure */
|
||||
+ if (!pNtQuerySystemInformation)
|
||||
+ win_skip("NtQuerySystemInformation not found, unable to verify results\n");
|
||||
+ else
|
||||
+ {
|
||||
+ char performance_buffer[sizeof(SYSTEM_PERFORMANCE_INFORMATION) + 16]; /* larger on w2k8/win7 */
|
||||
+ SYSTEM_PERFORMANCE_INFORMATION *sys_performance_info = (SYSTEM_PERFORMANCE_INFORMATION *)performance_buffer;
|
||||
+ SYSTEM_BASIC_INFORMATION sys_basic_info;
|
||||
+ SYSTEM_PROCESS_INFORMATION *sys_process_info, *spi;
|
||||
+ DWORD process_count, handle_count, thread_count;
|
||||
+
|
||||
+ /* SYSTEM_PERFORMANCE_INFORMATION */
|
||||
+ size = 0;
|
||||
+ status = pNtQuerySystemInformation(SystemPerformanceInformation, sys_performance_info, sizeof(performance_buffer), &size);
|
||||
+ ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
|
||||
+ ok(size >= sizeof(SYSTEM_PERFORMANCE_INFORMATION), "incorrect length %d\n", size);
|
||||
+
|
||||
+ /* SYSTEM_BASIC_INFORMATION */
|
||||
+ size = 0;
|
||||
+ status = pNtQuerySystemInformation(SystemBasicInformation, &sys_basic_info, sizeof(sys_basic_info), &size);
|
||||
+ ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
|
||||
+ ok(size >= sizeof(SYSTEM_BASIC_INFORMATION), "incorrect length %d\n", size);
|
||||
+
|
||||
+ /* SYSTEM_PROCESS_INFORMATION */
|
||||
+ size = 0;
|
||||
+ status = pNtQuerySystemInformation(SystemProcessInformation, NULL, 0, &size);
|
||||
+ ok(status == STATUS_INFO_LENGTH_MISMATCH, "expected STATUS_LENGTH_MISMATCH, got %08x\n", status);
|
||||
+ ok(size > 0, "incorrect length %d\n", size);
|
||||
+
|
||||
+ while (status == STATUS_INFO_LENGTH_MISMATCH)
|
||||
+ {
|
||||
+ sys_process_info = HeapAlloc(GetProcessHeap(), 0, size);
|
||||
+ ok(sys_process_info != NULL, "failed to allocate memory\n");
|
||||
+ status = pNtQuerySystemInformation(SystemProcessInformation, sys_process_info, size, &size);
|
||||
+ if (!status) break;
|
||||
+ HeapFree(GetProcessHeap(), 0, sys_process_info);
|
||||
+ }
|
||||
+ ok(status == STATUS_SUCCESS, "expected STATUS_SUCCESS, got %08x\n", status);
|
||||
+
|
||||
+ process_count = handle_count = thread_count = 0;
|
||||
+ for (spi = sys_process_info;; spi = (SYSTEM_PROCESS_INFORMATION *)(((PCHAR)spi) + spi->NextEntryOffset))
|
||||
+ {
|
||||
+ process_count++;
|
||||
+ handle_count += spi->HandleCount;
|
||||
+ thread_count += spi->dwThreadCount;
|
||||
+ if (spi->NextEntryOffset == 0) break;
|
||||
+ }
|
||||
+
|
||||
+ ok(info.CommitTotal == sys_performance_info->TotalCommittedPages,
|
||||
+ "expected info.CommitTotal=%u but got %u\n",
|
||||
+ sys_performance_info->TotalCommittedPages, (ULONG)info.CommitTotal);
|
||||
+
|
||||
+ ok(info.CommitLimit == sys_performance_info->TotalCommitLimit,
|
||||
+ "expected info.CommitLimit=%u but got %u\n",
|
||||
+ sys_performance_info->TotalCommitLimit, (ULONG)info.CommitLimit);
|
||||
+
|
||||
+ ok(info.CommitPeak == sys_performance_info->PeakCommitment,
|
||||
+ "expected info.CommitPeak=%u but got %u\n",
|
||||
+ sys_performance_info->PeakCommitment, (ULONG)info.CommitPeak);
|
||||
+
|
||||
+ ok(info.PhysicalTotal == sys_basic_info.MmNumberOfPhysicalPages,
|
||||
+ "expected info.PhysicalTotal=%u but got %u\n",
|
||||
+ sys_basic_info.MmNumberOfPhysicalPages, (ULONG)info.PhysicalTotal);
|
||||
+
|
||||
+ ok(info.PhysicalAvailable >= max(sys_performance_info->AvailablePages, 25) - 25 &&
|
||||
+ info.PhysicalAvailable <= sys_performance_info->AvailablePages + 25,
|
||||
+ "expected approximately info.PhysicalAvailable=%u but got %u\n",
|
||||
+ sys_performance_info->AvailablePages, (ULONG)info.PhysicalAvailable);
|
||||
+
|
||||
+ /* ok(info.SystemCache == sys_performance_info->MmSystemCachePage,
|
||||
+ "expected info.SystemCache=%u but got %u\n",
|
||||
+ sys_performance_info->MmSystemCachePage, (ULONG)info.SystemCache); */
|
||||
+
|
||||
+ ok(info.KernelTotal == sys_performance_info->PagedPoolUsage + sys_performance_info->NonPagedPoolUsage,
|
||||
+ "expected info.KernelTotal=%u but got %u\n",
|
||||
+ sys_performance_info->PagedPoolUsage + sys_performance_info->NonPagedPoolUsage, (ULONG)info.KernelTotal);
|
||||
+
|
||||
+ ok(info.KernelPaged == sys_performance_info->PagedPoolUsage,
|
||||
+ "expected info.KernelPaged=%u but got %u\n",
|
||||
+ sys_performance_info->PagedPoolUsage, (ULONG)info.KernelPaged);
|
||||
+
|
||||
+ ok(info.KernelNonpaged == sys_performance_info->NonPagedPoolUsage,
|
||||
+ "expected info.KernelNonpaged=%u but got %u\n",
|
||||
+ sys_performance_info->NonPagedPoolUsage, (ULONG)info.KernelNonpaged);
|
||||
+
|
||||
+ ok(info.PageSize == sys_basic_info.PageSize,
|
||||
+ "expected info.PageSize=%u but got %u\n",
|
||||
+ sys_basic_info.PageSize, (ULONG)info.PageSize);
|
||||
+
|
||||
+ ok(info.HandleCount == handle_count,
|
||||
+ "expected info.HandleCount=%u but got %u\n",
|
||||
+ handle_count, info.HandleCount);
|
||||
+
|
||||
+ ok(info.ProcessCount == process_count,
|
||||
+ "expected info.ProcessCount=%u but got %u\n",
|
||||
+ process_count, info.ProcessCount);
|
||||
+
|
||||
+ ok(info.ThreadCount == thread_count,
|
||||
+ "expected info.ThreadCount=%u but got %u\n",
|
||||
+ thread_count, info.ThreadCount);
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, sys_process_info);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+
|
||||
static void test_GetProcessMemoryInfo(void)
|
||||
{
|
||||
PROCESS_MEMORY_COUNTERS pmc;
|
||||
@@ -677,6 +811,7 @@ START_TEST(psapi_main)
|
||||
test_EnumProcesses();
|
||||
test_EnumProcessModules();
|
||||
test_GetModuleInformation();
|
||||
+ test_GetPerformanceInfo();
|
||||
test_GetProcessMemoryInfo();
|
||||
test_GetMappedFileName();
|
||||
test_GetProcessImageFileName();
|
||||
--
|
||||
2.1.3
|
||||
|
@ -1,4 +0,0 @@
|
||||
Author: Sebastian Lackner
|
||||
Subject: Fix implementation of K32GetPerformanceInfo.
|
||||
Revision: 1
|
||||
Fixes: [37512] Fix implementation of K32GetPerformanceInfo
|
@ -1,4 +1,4 @@
|
||||
From 63e3716b712d4ad9e811fe550906f72ec916a813 Mon Sep 17 00:00:00 2001
|
||||
From 1d4383d08858f302927f08138bbe81093efbfd14 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 28 Sep 2014 22:42:46 +0200
|
||||
Subject: ntdll: Throw exception if invalid handle is passed to NtClose and
|
||||
@ -62,10 +62,10 @@ index 47a2614..bcc6d69 100644
|
||||
}
|
||||
|
||||
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
|
||||
index a94ed3a..4df8fe5 100644
|
||||
index 5cbab71..7a97ae5 100644
|
||||
--- a/dlls/ntdll/tests/exception.c
|
||||
+++ b/dlls/ntdll/tests/exception.c
|
||||
@@ -51,6 +51,7 @@ static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
|
||||
@@ -53,6 +53,7 @@ static NTSTATUS (WINAPI *pNtTerminateProcess)(HANDLE handle, LONG exit_code);
|
||||
static NTSTATUS (WINAPI *pNtQueryInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG, PULONG);
|
||||
static NTSTATUS (WINAPI *pNtSetInformationProcess)(HANDLE, PROCESSINFOCLASS, PVOID, ULONG);
|
||||
static BOOL (WINAPI *pIsWow64Process)(HANDLE, PBOOL);
|
||||
@ -73,7 +73,7 @@ index a94ed3a..4df8fe5 100644
|
||||
|
||||
#if defined(__x86_64__)
|
||||
static BOOLEAN (CDECL *pRtlAddFunctionTable)(RUNTIME_FUNCTION*, DWORD, DWORD64);
|
||||
@@ -936,6 +937,16 @@ static void test_debugger(void)
|
||||
@@ -938,6 +939,16 @@ static void test_debugger(void)
|
||||
/* here we handle exception */
|
||||
}
|
||||
}
|
||||
@ -90,11 +90,10 @@ index a94ed3a..4df8fe5 100644
|
||||
else
|
||||
ok(FALSE, "unexpected stage %x\n", stage);
|
||||
|
||||
@@ -1788,6 +1799,53 @@ static void test_ripevent(DWORD numexc)
|
||||
|
||||
@@ -1791,6 +1802,53 @@ static void test_ripevent(DWORD numexc)
|
||||
pRtlRemoveVectoredExceptionHandler(vectored_handler);
|
||||
}
|
||||
+
|
||||
|
||||
+static DWORD invalid_handle_exceptions;
|
||||
+
|
||||
+static LONG CALLBACK invalid_handle_vectored_handler(EXCEPTION_POINTERS *ExceptionInfo)
|
||||
@ -141,10 +140,11 @@ index a94ed3a..4df8fe5 100644
|
||||
+
|
||||
+ pRtlRemoveVectoredExceptionHandler(vectored_handler);
|
||||
+}
|
||||
#endif /* defined(__i386__) || defined(__x86_64__) */
|
||||
|
||||
START_TEST(exception)
|
||||
@@ -1804,6 +1862,7 @@ START_TEST(exception)
|
||||
+
|
||||
static void test_vectored_continue_handler(void)
|
||||
{
|
||||
PVOID handler1, handler2;
|
||||
@@ -1843,6 +1901,7 @@ START_TEST(exception)
|
||||
pNtGetContextThread = (void *)GetProcAddress( hntdll, "NtGetContextThread" );
|
||||
pNtSetContextThread = (void *)GetProcAddress( hntdll, "NtSetContextThread" );
|
||||
pNtReadVirtualMemory = (void *)GetProcAddress( hntdll, "NtReadVirtualMemory" );
|
||||
@ -152,7 +152,7 @@ index a94ed3a..4df8fe5 100644
|
||||
pRtlUnwind = (void *)GetProcAddress( hntdll, "RtlUnwind" );
|
||||
pRtlRaiseException = (void *)GetProcAddress( hntdll, "RtlRaiseException" );
|
||||
pNtTerminateProcess = (void *)GetProcAddress( hntdll, "NtTerminateProcess" );
|
||||
@@ -1867,6 +1926,10 @@ START_TEST(exception)
|
||||
@@ -1910,6 +1969,10 @@ START_TEST(exception)
|
||||
test_ripevent(0);
|
||||
test_stage = 6;
|
||||
test_ripevent(1);
|
||||
@ -163,22 +163,22 @@ index a94ed3a..4df8fe5 100644
|
||||
}
|
||||
else
|
||||
skip( "RtlRaiseException not found\n" );
|
||||
@@ -1880,6 +1943,7 @@ START_TEST(exception)
|
||||
@@ -1923,6 +1986,7 @@ START_TEST(exception)
|
||||
test_rtlraiseexception();
|
||||
test_outputdebugstring(1, FALSE);
|
||||
test_ripevent(1);
|
||||
+ test_closehandle(0);
|
||||
test_vectored_continue_handler();
|
||||
test_debugger();
|
||||
test_simd_exceptions();
|
||||
test_fpu_exceptions();
|
||||
@@ -1898,6 +1962,7 @@ START_TEST(exception)
|
||||
@@ -1942,6 +2006,7 @@ START_TEST(exception)
|
||||
|
||||
test_outputdebugstring(1, FALSE);
|
||||
test_ripevent(1);
|
||||
+ test_closehandle(0);
|
||||
test_vectored_continue_handler();
|
||||
test_virtual_unwind();
|
||||
|
||||
if (pRtlAddFunctionTable && pRtlDeleteFunctionTable && pRtlInstallFunctionTableCallback && pRtlLookupFunctionEntry)
|
||||
--
|
||||
2.1.3
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
From fbc7c0a7ec5822215a9da690ea75d8cb3359bc9e Mon Sep 17 00:00:00 2001
|
||||
From 51935986a1e973ab26dc3035905a47e1f19c6062 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Sun, 28 Sep 2014 23:39:51 +0200
|
||||
Subject: ntdll: OutputDebugString should throw the exception a second time, if
|
||||
@ -38,10 +38,10 @@ index d4d66b2..981661b 100644
|
||||
if (!mutex_inited)
|
||||
{
|
||||
diff --git a/dlls/ntdll/tests/exception.c b/dlls/ntdll/tests/exception.c
|
||||
index bc36242..3f0e6f5 100644
|
||||
index 7a97ae5..b0f0fac 100644
|
||||
--- a/dlls/ntdll/tests/exception.c
|
||||
+++ b/dlls/ntdll/tests/exception.c
|
||||
@@ -1724,7 +1724,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce
|
||||
@@ -1727,7 +1727,7 @@ static LONG CALLBACK outputdebugstring_vectored_handler(EXCEPTION_POINTERS *Exce
|
||||
return EXCEPTION_CONTINUE_SEARCH;
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ index bc36242..3f0e6f5 100644
|
||||
{
|
||||
PVOID vectored_handler;
|
||||
|
||||
@@ -1739,13 +1739,8 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
|
||||
@@ -1742,13 +1742,8 @@ static void test_outputdebugstring(DWORD numexc, BOOL todo)
|
||||
|
||||
outputdebugstring_exceptions = 0;
|
||||
OutputDebugStringA("Hello World");
|
||||
@ -66,7 +66,7 @@ index bc36242..3f0e6f5 100644
|
||||
|
||||
pRtlRemoveVectoredExceptionHandler(vectored_handler);
|
||||
}
|
||||
@@ -1917,9 +1912,9 @@ START_TEST(exception)
|
||||
@@ -1962,9 +1957,9 @@ START_TEST(exception)
|
||||
run_rtlraiseexception_test(EXCEPTION_BREAKPOINT);
|
||||
run_rtlraiseexception_test(EXCEPTION_INVALID_HANDLE);
|
||||
test_stage = 3;
|
||||
@ -78,7 +78,7 @@ index bc36242..3f0e6f5 100644
|
||||
test_stage = 5;
|
||||
test_ripevent(0);
|
||||
test_stage = 6;
|
||||
@@ -1939,7 +1934,7 @@ START_TEST(exception)
|
||||
@@ -1984,7 +1979,7 @@ START_TEST(exception)
|
||||
test_unwind();
|
||||
test_exceptions();
|
||||
test_rtlraiseexception();
|
||||
@ -86,8 +86,8 @@ index bc36242..3f0e6f5 100644
|
||||
+ test_outputdebugstring(1);
|
||||
test_ripevent(1);
|
||||
test_closehandle(0);
|
||||
test_debugger();
|
||||
@@ -1958,7 +1953,7 @@ START_TEST(exception)
|
||||
test_vectored_continue_handler();
|
||||
@@ -2004,7 +1999,7 @@ START_TEST(exception)
|
||||
pRtlLookupFunctionEntry = (void *)GetProcAddress( hntdll,
|
||||
"RtlLookupFunctionEntry" );
|
||||
|
||||
@ -95,7 +95,7 @@ index bc36242..3f0e6f5 100644
|
||||
+ test_outputdebugstring(1);
|
||||
test_ripevent(1);
|
||||
test_closehandle(0);
|
||||
test_virtual_unwind();
|
||||
test_vectored_continue_handler();
|
||||
--
|
||||
2.1.1
|
||||
2.1.3
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user