https://bugs.winehq.org/show_bug.cgi?id=51457
Bug ID: 51457 Summary: The 32-bit version:install fails in 64-bit wineprefixes Product: Wine Version: 6.10 Hardware: x86-64 OS: Linux Status: NEW Severity: normal Priority: P2 Component: version Assignee: wine-bugs@winehq.org Reporter: fgouget@codeweavers.com Distribution: ---
The 32-bit version:install fails in 64-bit wineprefixes:
https://test.winehq.org/data/patterns.html#version:install
install.c:250: Test failed: Wrong return value got 0 expected VFF_CURNEDEST set install.c:255: Test failed: Wrong return value got 0 expected VFF_CURNEDEST set install.c:260: Test failed: Wrong return value got 0 expected VFF_CURNEDEST set
All three failing tests query regedit.exe which is installed in two locations in Wine: windows/regedit.exe windows/syswow64/regedit.exe
The failure happens because CreateFileA("C:\windows\system32\regedit.exe") succeeds despite that file not actually being present (see file_existsA() in dlls/kernelbase/version.c).
So either this is a WoW32 file remapping issue, or this is not the right way to check for this file.
https://bugs.winehq.org/show_bug.cgi?id=51457
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=51457
--- Comment #1 from François Gouget fgouget@codeweavers.com --- Notes from a 64-bit Windows 10 machine: * Windows has the same two regedit.exe files; plus some in WinSxS\amd64_*. So the WinePrefix layout seems ok (in particular c:\Windows\system32\regedit.exe does not exist). * GetSystemDirectoryA() returns "C:\windows\system32" regardless of the process bitness. Again this matches Wine. * Yet calling CreateFileA("C:\windows\system32\regedit.exe") in a 32-bit process on a 64-bit Windows succeeds while it fails in a 64-bit process. Again this matches Wine. * But that last point causes file_existsA() to return TRUE instead of FALSE, which is why VerFindFileA() does not return VFF_CURNEDEST.
So the bug seems to be in the file_existsA() / VerFindFileA() implementation which fails to take the WoW32 case into account.
https://bugs.winehq.org/show_bug.cgi?id=51457
--- Comment #2 from François Gouget fgouget@codeweavers.com --- This failures is now marked as a todo, i.e. Wine still needs fixing but at least the test does not fail:
commit 0038d5adba0893cce915729b29a4f42b39909538 Author: Alexandre Julliard julliard@winehq.org Date: Wed Sep 7 17:47:26 2022 +0200
version/tests: Mark a test that fails on Wow64 as todo.
https://bugs.winehq.org/show_bug.cgi?id=51457
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|The 32-bit version:install |The 32-bit version:install |fails in 64-bit |fails in 64-bit |wineprefixes |wineprefixes (now todo)
https://bugs.winehq.org/show_bug.cgi?id=51457
François Gouget fgouget@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |0038d5adba0893cce915729b29a | |4f42b39909538 Resolution|--- |FIXED Status|NEW |RESOLVED
--- Comment #3 from François Gouget fgouget@codeweavers.com --- This bug got fixed by the commit below:
commit 0038d5adba0893cce915729b29a4f42b39909538 Author: Alexandre Julliard julliard@winehq.org Date: Wed Sep 7 17:47:26 2022 +0200
version/tests: Mark a test that fails on Wow64 as todo.
https://bugs.winehq.org/show_bug.cgi?id=51457
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 8.0-rc1.