Today, NtCreateThreadEx() passes to pthread_attr_setstack() an address
range that spans both the user (PE) stack and the kernel (Unix) stack.
pthread_attr_setstack() accepts an address range that will be used as
the initial stack area for the thread created by pthread_create(). It
is often assumed that the initial stack will be available for the entire
duration of the thread's lifetime.
This assumption, however, conflicts with how Win32 fibers operate.
Fiber APIs allow the thread's initial stack to be freed before the
thread exits, or kept alive beyond the point of thread's termination.
This allows the lifetime of the thread's initial stack to be shorter or
longer than the originating thread's lifetime. This is possible because
each fiber has its own stack and context, and ConvertThreadToFiber()
transfers the current thread's stack to a new fiber.
This specifically causes problems in Glibc v2.31 and earlier. These
Glibc versions have a bug where madvise(2) with the MADV_DONTNEED flag
is called on the initial stack area on thread exit, even when the stack
was user-supplied (via pthread_attr_setstack). Therefore, the kernel
may zero out any portion of the initial stack at any time after the
originating thread terminates, even if the stack no longer belongs to
the current thread (either freed and reallocated, or owned by a fiber).
This may ultimately lead to memory corruption.
Fix this by only passing the syscall (kernel) portion of the stack to
pthread_attr_setstack().
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2468
--
v2: winemac: Use the default IME implementation for stubs.
winex11: Use the default IME implementation for stubs.
imm32: Return TRUE from ImmIsIME with any HKL.
imm32: Add a default implementation for IME functions.
imm32: Introduce new input_context_init helper.
imm32: Select current IME on input contexts when needed.
imm32: Send WM_IME_SELECT messages when IME is activated.
imm32: Pass the HIMC to the IME UI window IMMGWL_IMC.
win32u: Ignore some IME messages in default_window_proc.
win32u: Ignore IME messages from IME UI windows in DefWindowProc.
imm32/tests: Test DefWindowProc with IME UI messages.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2539
The app I'm considering opens a video_processor on its own, with
a NV12 format on input and a ARGB32 format on output.
Tested on Windows: the samples are flipped vertically. While Wine
keeps them untouched.
So added a videoflip in the video processor to be activated when needed.
Current activation is based on RGB vs non RGB input/output formats.
Set as draft as if somehow related to MR!2159.
Comments welcomed.
Signed-off-by: Eric Pouech <epouech(a)codeweavers.com>
--
v2: winegstreamer: In video_processor, activate a videoflip converter.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2471
Fixes Epic Online Services update hanging when the service needs to be restarted (a helper process is waiting for either service's mutex to be available or QueryServiceStatus to tell that the server is stopped after the service had just exited the process without notifying service control manager).
It seems to me that using a job object is much simpler than the other ways (like waiting on multiple process handles and managing process addition and deletion in the waiters list). I tested that on real up to date Windows 10 machine and there the process has the job object which object has JOB_OBJECT_LIMIT_BREAKAWAY_OK | JOB_OBJECT_LIMIT_SILENT_BREAKAWAY_OK limit flags (and only those). That job has also the other service processes in it but not services.exe itself. However, for some reason on any Testbot machine that is not the case and IsProcessInJob() reports that the process doesn't have a job. But since I do see that job on a real machine I think using job object here is fine.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/2536