[PATCH] msvcrt:msvcrt_get_flags: Fix bug 51846 - fopen(..., "wx")

Piotr Caban piotr.caban at gmail.com
Fri Oct 8 03:18:43 CDT 2021


On 10/8/21 9:41 AM, Ted Lyngmo wrote:
> Patch 1: msvcrt: https://testbot.winehq.org/JobDetails.pl?Key=99682
> 
> This patch makes programs compiled by Visual Studio and that works as 
> expected in native Windows also work in Wine.
> 
> The only problem with my added test seems to be that programs 
> cross-compiled with mingw does not work on native Windows so the tests 
> fail.
It doesn't look right. I'm not sure how you're testing it but as your 
test shows msvcrt.dll is not supposed to handle x mode.

> Patch 2: ucrtbase: https://testbot.winehq.org/JobDetails.pl?Key=99684
> 
> This patch fails less tests but does not solve the bug at all - so I 
> don't think it's worth looking into why this patch also made totally 
> unrelated tests fail. I think this patch can be abandoned.
> 
> I'm not sure where to go from here.
Are you sure you have tested it correctly? Did you recompile ucrtbase 
with your patch?

The "misc.c:550: Test failed: 9 should be blank" failure is not related 
to your patch and can be ignored. But there are other failures caused by 
your patch:
misc.c:372: Test failed: unexpected call global_invalid_parameter_handler
misc.c:1548: Test failed: creating file with mode wx failed
misc.c:372: Test failed: unexpected call global_invalid_parameter_handler
misc.c:372: Test failed: unexpected call global_invalid_parameter_handler
misc.c:372: Test failed: unexpected call global_invalid_parameter_handler
misc.c:1557: Test failed: creating file with mode w+x failed
misc.c:372: Test failed: unexpected call global_invalid_parameter_handler
misc.c:372: Test failed: unexpected call global_invalid_parameter_handler

This generally shows that x mode is not supported in older version of 
ucrtbase. While this needs to be fixed before the patch can go into wine 
I would suggest focusing on understanding why the patch doesn't fix your 
test app first (I guess it's a mistake while testing).

Thanks,
Piotr



More information about the wine-devel mailing list