From f6749f92decbfe6d9c537c4141ef59b5f79e7dbc Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 18 Dec 2014 23:26:56 +0100 Subject: [PATCH] Added patch for stub of ntdll.RtlSetHeapInformation. --- README.md | 3 +- debian/changelog | 1 + patches/Makefile | 13 ++++ ...l-Add-stub-for-RtlSetHeapInformation.patch | 74 +++++++++++++++++++ .../ntdll-RtlSetHeapInformation/definition | 1 + 5 files changed, 91 insertions(+), 1 deletion(-) create mode 100644 patches/ntdll-RtlSetHeapInformation/0001-ntdll-Add-stub-for-RtlSetHeapInformation.patch create mode 100644 patches/ntdll-RtlSetHeapInformation/definition diff --git a/README.md b/README.md index 9f32f8cd..b4b4a27a 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,9 @@ Wine. All those differences are also documented on the Included bug fixes and improvements =================================== -**Bugfixes and features included in the next upcoming release [2]:** +**Bugfixes and features included in the next upcoming release [3]:** +* Add stub for RtlSetHeapInformation * Ensure X11 input events are handled even without explicit message loop ([Wine Bug #8854](https://bugs.winehq.org/show_bug.cgi?id=8854)) * Fix handling of subdirectory in FtpFindFirstFile ([Wine Bug #16526](https://bugs.winehq.org/show_bug.cgi?id=16526)) diff --git a/debian/changelog b/debian/changelog index 01cb60b8..d77b06d9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,7 @@ wine-staging (1.7.34) UNRELEASED; urgency=low * Added patch to return proper charcount for GetLocaleInfo with LOCALE_IFIRSTDAYOFWEEK. * Added patch to ensure X11 input events are handled even without explicit message loop. * Added test for server-Unexpected_Wakeup patch. + * Added patch for stub of ntdll.RtlSetHeapInformation. * Removed patch to implement combase HSTRING objects (accepted upstream). * Removed patch to add fake ProductId to registry (accepted upstream). * Removed patch to implement stubs for MFStartup and MFShutdown (accepted upstream). diff --git a/patches/Makefile b/patches/Makefile index b0bb6e3a..e1de33ad 100644 --- a/patches/Makefile +++ b/patches/Makefile @@ -73,6 +73,7 @@ PATCHLIST := \ ntdll-NtQuerySection.ok \ ntdll-NtSetLdtEntries.ok \ ntdll-Pipe_SpecialCharacters.ok \ + ntdll-RtlSetHeapInformation.ok \ ntdll-ThreadTime.ok \ ntdll-User_Shared_Data.ok \ ntdll-WRITECOPY.ok \ @@ -1092,6 +1093,18 @@ ntdll-Pipe_SpecialCharacters.ok: echo '+ { "Michael Müller", "ntdll: Allow special characters in pipe names.", 1 },'; \ ) > ntdll-Pipe_SpecialCharacters.ok +# Patchset ntdll-RtlSetHeapInformation +# | +# | Modified files: +# | * dlls/kernel32/heap.c, dlls/ntdll/heap.c, dlls/ntdll/ntdll.spec, include/winternl.h +# | +.INTERMEDIATE: ntdll-RtlSetHeapInformation.ok +ntdll-RtlSetHeapInformation.ok: + $(call APPLY_FILE,ntdll-RtlSetHeapInformation/0001-ntdll-Add-stub-for-RtlSetHeapInformation.patch) + @( \ + echo '+ { "Sergey Kalinichev", "ntdll: Add stub for RtlSetHeapInformation.", 1 },'; \ + ) > ntdll-RtlSetHeapInformation.ok + # Patchset ntdll-ThreadTime # | # | This patchset fixes the following Wine bugs: diff --git a/patches/ntdll-RtlSetHeapInformation/0001-ntdll-Add-stub-for-RtlSetHeapInformation.patch b/patches/ntdll-RtlSetHeapInformation/0001-ntdll-Add-stub-for-RtlSetHeapInformation.patch new file mode 100644 index 00000000..c8d5fdc5 --- /dev/null +++ b/patches/ntdll-RtlSetHeapInformation/0001-ntdll-Add-stub-for-RtlSetHeapInformation.patch @@ -0,0 +1,74 @@ +From 74219272ffbf828d22c52f68a00720d8f4ab12b7 Mon Sep 17 00:00:00 2001 +From: Sergey Kalinichev +Date: Thu, 18 Dec 2014 23:03:58 +0400 +Subject: ntdll: Add stub for RtlSetHeapInformation. + +--- + dlls/kernel32/heap.c | 5 +++-- + dlls/ntdll/heap.c | 10 ++++++++++ + dlls/ntdll/ntdll.spec | 2 +- + include/winternl.h | 1 + + 4 files changed, 15 insertions(+), 3 deletions(-) + +diff --git a/dlls/kernel32/heap.c b/dlls/kernel32/heap.c +index 9037f8e..cac73ec 100644 +--- a/dlls/kernel32/heap.c ++++ b/dlls/kernel32/heap.c +@@ -296,8 +296,9 @@ BOOL WINAPI HeapQueryInformation( HANDLE heap, HEAP_INFORMATION_CLASS info_class + + BOOL WINAPI HeapSetInformation( HANDLE heap, HEAP_INFORMATION_CLASS infoclass, PVOID info, SIZE_T size) + { +- FIXME("%p %d %p %ld\n", heap, infoclass, info, size ); +- return TRUE; ++ NTSTATUS ret = RtlSetHeapInformation( heap, infoclass, info, size ); ++ if (ret) SetLastError( RtlNtStatusToDosError(ret) ); ++ return !ret; + } + + /* +diff --git a/dlls/ntdll/heap.c b/dlls/ntdll/heap.c +index 3bb7a11..4537689 100644 +--- a/dlls/ntdll/heap.c ++++ b/dlls/ntdll/heap.c +@@ -2252,3 +2252,13 @@ NTSTATUS WINAPI RtlQueryHeapInformation( HANDLE heap, HEAP_INFORMATION_CLASS inf + return STATUS_INVALID_INFO_CLASS; + } + } ++ ++/*********************************************************************** ++ * RtlSetHeapInformation (NTDLL.@) ++ */ ++NTSTATUS WINAPI RtlSetHeapInformation( HANDLE heap, HEAP_INFORMATION_CLASS info_class, ++ PVOID info, SIZE_T size ) ++{ ++ FIXME("%p %d %p %ld stub\n", heap, info_class, info, size); ++ return STATUS_SUCCESS; ++} +diff --git a/dlls/ntdll/ntdll.spec b/dlls/ntdll/ntdll.spec +index 7e95969..791b66e 100644 +--- a/dlls/ntdll/ntdll.spec ++++ b/dlls/ntdll/ntdll.spec +@@ -847,7 +847,7 @@ + @ stdcall RtlSetDaclSecurityDescriptor(ptr long ptr long) + @ stdcall RtlSetEnvironmentVariable(ptr ptr ptr) + @ stdcall RtlSetGroupSecurityDescriptor(ptr ptr long) +-# @ stub RtlSetHeapInformation ++@ stdcall RtlSetHeapInformation(ptr long ptr long) + @ stub RtlSetInformationAcl + @ stdcall RtlSetIoCompletionCallback(long ptr long) + @ stdcall RtlSetLastWin32Error(long) +diff --git a/include/winternl.h b/include/winternl.h +index 5a27f94..8ba1e89 100644 +--- a/include/winternl.h ++++ b/include/winternl.h +@@ -2509,6 +2509,7 @@ NTSYSAPI NTSTATUS WINAPI RtlSetDaclSecurityDescriptor(PSECURITY_DESCRIPTOR,BOOL + NTSYSAPI NTSTATUS WINAPI RtlSetEnvironmentVariable(PWSTR*,PUNICODE_STRING,PUNICODE_STRING); + NTSYSAPI NTSTATUS WINAPI RtlSetOwnerSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN); + NTSYSAPI NTSTATUS WINAPI RtlSetGroupSecurityDescriptor(PSECURITY_DESCRIPTOR,PSID,BOOLEAN); ++NTSYSAPI NTSTATUS WINAPI RtlSetHeapInformation(HANDLE,HEAP_INFORMATION_CLASS,PVOID,SIZE_T); + NTSYSAPI NTSTATUS WINAPI RtlSetIoCompletionCallback(HANDLE,PRTL_OVERLAPPED_COMPLETION_ROUTINE,ULONG); + NTSYSAPI void WINAPI RtlSetLastWin32Error(DWORD); + NTSYSAPI void WINAPI RtlSetLastWin32ErrorAndNtStatusFromNtStatus(NTSTATUS); +-- +2.1.3 + diff --git a/patches/ntdll-RtlSetHeapInformation/definition b/patches/ntdll-RtlSetHeapInformation/definition new file mode 100644 index 00000000..e0ec602f --- /dev/null +++ b/patches/ntdll-RtlSetHeapInformation/definition @@ -0,0 +1 @@ +Fixes: Add stub for RtlSetHeapInformation