Demonstrate a refcount leak on the class factory when a class with
ThreadingModel=Apartment is instantiated in the MTA. CoGetClassObject
ends up using apartment_hostobject to launch an STA thread in which to
host the object, but the process of marshaling this class factory back
into the MTA leaks a reference on it.
This leak is usually minor (class factory implementations are usually
singletons, so it's a one-of rather than a cumulative leak), but it will
generally lock that COM server and e.g. prevent CoFreeUnusedLibraries
from being able to clean up properly.
When CoMarshalInterface succeeds, it added an *additional* refcount
represented by the marshaling data written to the stream. The original
refcount returned from apartment_getclassobject needs to be released
regardless of marshaling success or failure.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7880
This is a regression from 405eb2a386df0135174c5d04a24cb3b1adc1c710.
Now with two kinds of handlers we need to check for nulls in both loops.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7874
Over the past several weeks I've been working on and off on this. I didn't track the hours but I'm sure that I've spent 80+ hours on the feature. I've tested and retested all known scenarios and it seems to be working as expected.
--
v12: cmd: Implement tab completion for command line entry.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7843
This implements setting `ThreadPriorityBoost`, `ProcessPriorityBoost`, `ProcessBasePriority` and getting `ThreadPriorityBoost`, `ProcessPriorityBoost` NT info classes and adds tests where appropriate.
The actual boosting mechanism will be in part 2 to keep the size of this MR manageable.
--
v2: kernel32/tests: Add tests for GetProcessPriorityBoost/SetProcessPriorityBoost.
kernelbase: Implement SetProcessPriorityBoost.
kernelbase: Implement GetProcessPriorityBoost.
ntdll: Implement ProcessPriorityBoost class in NtSetInformationProcess.
ntdll: Implement ProcessPriorityBoost class in NtQueryInformationProcess.
ntdll: Implement ThreadPriorityBoost class in NtSetInformationThread.
ntdll: Properly implement ThreadPriorityBoost class in NtQueryInformationThread.
ntdll/tests: Add tests for setting process base priority.
ntdll: Implement ProcessBasePriority class in NtSetInformationProcess.
server: Use process base priority in set_thread_base_priority.
server: Store process base priority separately.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7869
--
v13: server: Handle hardlinks and casefolding when renaming the same file.
server: Handle renames to destinations containing trailing slashes.
kernel32/tests: Test renaming a file into a hardlink of itself.
kernel32/tests: Use FindClose instead of CloseHandle when closing
https://gitlab.winehq.org/wine/wine/-/merge_requests/6855