Using a dedicated exit jmpbuf and removing the need for assembly
routines.
When Wine handles an exception in unix code, we return to user mode by
jumping to the last syscall frame. This can leave some pthread cancel
cleanups registered, in the pthread internal linked list, and at the
same time later overwrite the stack frame they were registered for.
In the same way, jumping to the exit frame on thread exit or abort, can
also leave some cleanup handlers registered for invalid stack frames.
Depending on the implementation, calling pthread_exit will cause all the
registered pthread cleanup handlers to be called, possibly jumping back
to now overwritten stack frames and causing segmentation faults.
Exiting a pthread normally, by returning from its procedure, or calling
exit(0) for the main thread doesn't run pthread_exit and doesn't call
cleanup handlers, avoiding that situation.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52213
### Additional note:
For robustness, we should probably try to execute these cleanup handlers
when unwinding the stack frames, as we would otherwise leave pthread
objects in a potential problematic state (like a mutex locked, etc).
It is however hard to do so when the handlers are registered from some C
code: pthread C implementation is done by calling some internal pthread
functions to register the handlers, and they aren't registered as
standard unwind handlers.
Only pthread_cancel and pthread_exit can unwind and call / unregister
the C handlers, but interrupting that procedure, for instance calling
setjmp / longjmp from withing our own handler isn't supported.
From C++ code, pthread cleanup handlers are registered through C++ class
constructors / destructors, and it would then be possible to partially
unwind and call them at the same time.
--
v6: ntdll: Remove now unnecessary arch-specific exit frame.
ntdll: Avoid calling pthread_exit on thread exit.
ntdll: Return entry and suspend from server_init_process_done.
ntdll: Create a pthread for the main thread.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1088
--
v2: vkd3d-shader/hlsl: Add functions to the global list inside the func_prototype rule.
vkd3d-shader/hlsl: Use the original hlsl_ir_function_decl struct rather than allocating a new one for each definition.
vkd3d-shader/hlsl: Put synthetic variables into a dummy scope.
vkd3d-shader/hlsl: Add a hlsl_cleanup_semantic() helper.
vkd3d-shader/hlsl: Store function parameters in an array.
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/77
Allowing the job to fail to avoid failing the pipeline. Some new tests
are failing with it, and some are succeeding todo_wine.
--
v3: gitlab: Run user32 32-bit tests with nulldrv driver.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1259
The function is called a lot, I believe something like this would improve its performance in general.
--
v2: ntdll: Lookup extension from the end in hash_short_file_name.
ntdll: Use invalid char lookup table in lookup_unix_name.
ntdll: Use invalid char lookup table in nt_to_unix_file_name_no_root.
ntdll: Use invalid char lookup table in is_legal_8dot3_name.
ntdll: Use invalid char lookup table in is_invalid_dos_char.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1756
Installers based on InnoSetup use invisible window owning the main
installer window. When focus is given to the installer window popup,
window managers sometimes do not raise it as their owner is invisible
and it stays below other windows unless they are minimized.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49933
This is not a regression and it is arguably perhaps a window manager
bug, but it is also extremely annoying for users as installer windows
tend to disappear from the pager, as well as missing from the window
selector and below all other windows.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1859
This makes it possible to detect modules that weren't unmapped from
dlclose, and that we should not fixup again.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49640
This usually happens with C++ winelibs, where some C++ symbols may
be inlined into the winelib, then later resolved in preference over
other symbol definitions when libstdc++ loads.
This results in circular dependency between the winelib and libstdc++,
making dlclose no-op.
In this case, reloading the lib later and calling `map_so_dll` on it
again will fixup the RVAs again, ending up with invalid addresses.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1498