This fixes data race in ARM/ARM64 platforms, and prevents potential
memory access reordering by the compiler.
--
v3: gdiplus: Replace GpImage's busy flag with SRWLOCK.
gdiplus: Avoid copying GpImage's busy flag in select_frame_wic().
gdiplus: Avoid recursively locking image in GdipImageRotateFlip.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1003
This change has been in Proton to fix a bug in the DayZ launcher.
The launcher is a .NET application that, best I can tell, contains marshaling code that calls SetWindowPlacement incorrectly. This results in undefined memory being passed in and broken values returned by GetWindowPlacement. I think the value passed in must be broken on Windows, but as the tests show, Windows rejects SetWindowPlacement calls that don't have length set correctly (but not GetWindowPlacement, as zeroing the structure to give it an invalid length in `other_process_proc` shows).
--
v2: win32u: Reject invalid length in SetWindowPlacement.
user32: Test Get/SetWindowPlacement with invalid length.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1081
On Fri Oct 21 13:37:13 2022 +0000, Bartosz Kosiorek wrote:
> changed this line in [version 14 of the diff](/wine/wine/-/merge_requests/1120/diffs?diff_id=14967&start_sha=1fe0022187d425723510d747a81973ae0a57dd29#5cc40c9a9717f9205417155123fc4bce95d55d9d_651_651)
I implemented it as you said:
```
if(_ismbblead_l(*str, locale) && (str[1] != '\n'))
return 2;
return 1;
```
But maybe se should compare it to zero:
```
if(_ismbblead_l(*str, locale) && (str[1] != 0))
return 2;
return 1;
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1120#note_11828
On Sat Oct 22 13:16:09 2022 +0000, Bartosz Kosiorek wrote:
> changed this line in [version 16 of the diff](/wine/wine/-/merge_requests/1120/diffs?diff_id=15105&start_sha=01947548572fd5e442ee7677a63d2ff3c0f166e2#18ec41aa1588580e1f59f4c1c498c00b98b78b89_1012_1012)
true, fixes.
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1120#note_11802
As far as my testing goes, the message box is never shown on Windows when abort() is called with retail runtime is used, regardless of error mode and abort behaviour. That is not the case with _assert which still can show a dialog even in release mode.
It happens rather often that an app meets the error condition during the process exit and that goes silent on Windows while we display the abort dialog on app's exit.
The test program below shows that (and the same behaviour is, e. g., with ucrtbase vs ucrtbased).
```
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
void CDECL _set_app_type(int app_type);
#define D(name) static typeof(name) *p_##name
#define L(name) p_##name = (void *)GetProcAddress(hdll, #name); if (!p_##name) printf("NULL %s.\n", #name)
D(abort);
D(_set_app_type);
D(_set_abort_behavior);
D(_set_error_mode);
int main(int argc, char *argv[])
{
HMODULE hdll = LoadLibraryA("msvcrt.dll");
printf("hdll %p.\n", hdll);
L(_set_app_type);
if (!p__set_app_type)
if (!(p__set_app_type = (void *)GetProcAddress(hdll, "__set_app_type")))
printf("NULL p__set_app_type.\n");
L(abort);
L(_set_abort_behavior);
L(_set_error_mode);
p__set_app_type(2);
if (p__set_abort_behavior)
p__set_abort_behavior(_WRITE_ABORT_MSG, _WRITE_ABORT_MSG);
p__set_error_mode(_OUT_TO_MSGBOX);
p_abort();
}
```
--
v3: msvcrt: Display message box in abort() for specific CRT versions only.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1128