I had a bugreport here: https://bugs.winehq.org/show_bug.cgi?id=56161
This pull req fixes the bug that programs that do VirtualAlloc(placeholder)/VirtualFree(keep placeholder)/MapViewOfFile3(replace placeholder), do not run. Like the dotnet pe loader in .net 7 for example.
It was not clear to me at first, because i didnt notice it on msdn, but the way that Dmitry Timoshkov "hacked" it in https://bugs.winehq.org/show_bug.cgi?id=56122 is actually (nearly) how it is supposed to happen according to msdn.
From here: https://learn.microsoft.com/en-us/windows/win32/api/memoryapi/nf-memoryapi-… 
So thanks to Dmitry Timoshkov. If you are interested you could also look into the thing i mentioned in the bug report, that MapViewOfFile3 doesn't round down to 64k, but, i don't think this is a serious problem yet.
Edit: I found out that under windows, the alignment constraint is not fully lifted but, it is only required to be pagesize aligned if MEM_REPLACE_PLACEHOLDER is present in the flags.
To clarify why i want this in wine. The PE Loader of .net (see here https://github.com/dotnet/runtime/blob/f21dc6c3dceb6ea76bef73e2a026c770aaed…) does align with page size. Not with 64k. This breaks a .net 7 app during load up, that will execute otherwise just execute fine.
--
v18: kernelbase: Added a test for MapViewOfFile3 with MEM_REPLACE_PLACEHOLDER
https://gitlab.winehq.org/wine/wine/-/merge_requests/4822
Affected games: Phasmophobia, Lethal Company.
The games do not use joystick input but Unity Input subsystem is initialized and that's enough to cause stack overflow when it tries to parse 8 bit hat switches. Most joysticks and some mice have hats.
I own 2 Thrustmaster devices and this fixes the problem with them plugged in. I've also seen [report descriptors shared by Proton users](https://github.com/ValveSoftware/Proton/issues/7284) that reported the crash. The real devices always use 4 bits only.
This MR was tested using a few dinput test programs (upstream Wine) and Elite Dangerous (change was applied on top of the Proton tree). Singular hat works. I don't have anything with more than that though.
--
v4: winebus.sys: Use 4 bits for hat switches.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4964
When cross-compiling on macOS, like building on ARM64 to target x86_64 [1], `make install` would fail with `winebuild: cannot find the 'ar' tool`. `winebuild` was looking for `x86_64-apple-darwin-ar`, but macOS does not install prefixed tools. As a last step before failing in `find_tool()`, search for the un-prefixed tool name.
[1]: with a `configure` invocation like: `../configure --enable-archs=i386,x86_64 --host=x86_64-apple-darwin CC="clang -arch x86_64"`
--
v2: winebuild: As a last resort, search for tools un-prefixed using clang.
winebuild: Refactor find_tool().
https://gitlab.winehq.org/wine/wine/-/merge_requests/4966