https://bugs.winehq.org/show_bug.cgi?id=38021
Bug ID: 38021 Summary: ntdll:load_dll doesn't check for correct dll ARCH Product: Wine Version: unspecified Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: patrick1804@web.de Distribution: ---
Problem 1: ntdll:load_dll doesn't check if the found DLL has the wrong arch. For example: 64bit application want's to load xinput1_3.dll. There's a 32bit xinput1_3.dll in the same folder.
Expected behavior: It should ignore this dll, instead of trying to open it.
Problem 2: ntdll:load_dll doesn't check other locations for this DLL once a matching one has been found, even when it has the wrong arch and couldn't be loaded. For example: 64bit application want's to load xinput1_3.dll. There's a 32bit xinput1_3.dll in the same folder. It tries to open the file and fails. It doesn't check other folders like System32. The application doesn't start.
Expected behavior: load_dll looks for 64bit xinput1_3.dll in system32 and starts.
https://bugs.winehq.org/show_bug.cgi?id=38021
--- Comment #1 from Patrick Rudolph patrick1804@web.de --- Created attachment 50663 --> https://bugs.winehq.org/attachment.cgi?id=50663 load_dll: iterate over all folders in path, POC
this patch allows load_dll to iterate over every folder in the given path and check for a matching dll until one could be loaded. As soon as a dll is found and could be loaded it returns, introducing zero overhead for the most applications. Only on WoW it might try multiple dlls until a matching one is found. With this patch Planetside 2 x64 doesn't complain about missing xinput1_3 any more.
https://bugs.winehq.org/show_bug.cgi?id=38021
Patrick Rudolph patrick1804@web.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #50663|0 |1 is obsolete| |
--- Comment #2 from Patrick Rudolph patrick1804@web.de --- Created attachment 50666 --> https://bugs.winehq.org/attachment.cgi?id=50666 iterate over all folders in path, POC #2
this patch fixes a problem on 32bit with empty path and fixes a warning. With this patch Planetside2 x64 is able to find xinput1_3.dll in system32.
https://bugs.winehq.org/show_bug.cgi?id=38021
Linards linards.liepins@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |linards.liepins@gmail.com
--- Comment #3 from Linards linards.liepins@gmail.com --- (In reply to Patrick Rudolph from comment #2)
Created attachment 50666 [details] iterate over all folders in path, POC #2
this patch fixes a problem on 32bit with empty path and fixes a warning. With this patch Planetside2 x64 is able to find xinput1_3.dll in system32.
Hi.
Could you please provide the output of 'wine --version'?
https://bugs.winehq.org/show_bug.cgi?id=38021
Ken Sharp imwellcushtymelike@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, source
--- Comment #4 from Ken Sharp imwellcushtymelike@gmail.com --- Thanks for the patches. Patches aren't picked up from Bugzilla. If your patch is ready you can submit it via e-mail: http://wiki.winehq.org/SubmittingPatches
https://bugs.winehq.org/show_bug.cgi?id=38021
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
--- Comment #5 from Sebastian Lackner sebastian@fds-team.de --- The patch proposed in comment #2 is wrong, Michaels attempt to fix this issue is available here: https://github.com/wine-compholio/wine-staging/blob/master/patches/ntdll-Loa...
I have reviewed the patch and it should be correct, however I don't have any of the affected apps, so some testers would be very appreciated. ;)
https://bugs.winehq.org/show_bug.cgi?id=38021
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |michael@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=38021
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW URL| |https://www.planetside2.com CC| |focht@gmx.net Version|unspecified |1.7.35 See Also| |https://bugs.wine-staging.c | |om/show_bug.cgi?id=262 Summary|ntdll:load_dll doesn't |64-bit Planetside 2 fails |check for correct dll ARCH |to load bundled | |xinput1_3.dll (loader must | |check architecture before | |trying to load module) Ever confirmed|0 |1
--- Comment #6 from Anastasius Focht focht@gmx.net --- Hello folks,
filling fields and confirming on behalf.
Regards
https://bugs.winehq.org/show_bug.cgi?id=38021
Michael Müller michael@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/ntdll-Loader_M | |achine_Type
https://bugs.winehq.org/show_bug.cgi?id=38021
Justas L bucaneer@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |bucaneer@gmail.com
--- Comment #7 from Justas L bucaneer@gmail.com --- (In reply to Sebastian Lackner from comment #5)
The patch proposed in comment #2 is wrong, Michaels attempt to fix this issue is available here: https://github.com/wine-compholio/wine-staging/blob/master/patches/ntdll- Loader_Machine_Type/0001-ntdll-Check-architecture-before-loading-module.patch
I have reviewed the patch and it should be correct, however I don't have any of the affected apps, so some testers would be very appreciated. ;)
The staged patch (either applied individually, or as part of wine-staging) fixes this bug.
https://bugs.winehq.org/show_bug.cgi?id=38021
--- Comment #8 from Justas L bucaneer@gmail.com --- Could this patch make it in for the 1.8 release? The other blocker bug for Planetside 2 (bug 27680) should be resolved next week if GCC 5.3 gets released as planned, so if this patch is committed the game will be playable with vanilla Wine once again.
https://bugs.winehq.org/show_bug.cgi?id=38021
--- Comment #9 from Sebastian Lackner sebastian@fds-team.de --- (In reply to Justas L from comment #8)
Could this patch make it in for the 1.8 release? The other blocker bug for Planetside 2 (bug 27680) should be resolved next week if GCC 5.3 gets released as planned, so if this patch is committed the game will be playable with vanilla Wine once again.
We are during the code freeze at the moment, which means only patches with a small risk of regressions are accepted. Although this specific patch was tested in Wine Staging for some time, I would still consider it a bit too critical - changes in the Wine loader affect all applications, and its impossible to test everything in advance. :/
I hope you are aware that you can build a custom Wine version with this patch (or just use Wine Staging) in the meantime, so no need to wait when you want to play the game.
https://bugs.winehq.org/show_bug.cgi?id=38021
Andrew Chin achin+wine@eminence32.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |achin+wine@eminence32.net
--- Comment #10 from Andrew Chin achin+wine@eminence32.net --- I also confirm that 0001-ntdll-Check-architecture-before-loading-module.patch fixes this problem (when applied on top of wine-1.9.5)
https://bugs.winehq.org/show_bug.cgi?id=38021
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de Staged patchset|https://github.com/wine-com |https://github.com/wine-sta |pholio/wine-staging/tree/ma |ging/wine-staging/tree/mast |ster/patches/ntdll-Loader_M |er/patches/ntdll-Loader_Mac |achine_Type |hine_Type
https://bugs.winehq.org/show_bug.cgi?id=38021
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |zzhang@codeweavers.com
--- Comment #11 from Alexandre Julliard julliard@winehq.org --- *** Bug 46464 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=38021
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=38021
ignaz.k@live.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |ignaz.k@live.de
https://bugs.winehq.org/show_bug.cgi?id=38021
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|STAGED |RESOLVED Resolution|--- |FIXED Fixed by SHA1| |9839bb7691a1b1c57a4ca501d03 | |825420c1609d7
--- Comment #12 from Alexandre Julliard julliard@winehq.org --- This should be fixed by 9839bb7691a1b1c57a4ca501d03825420c1609d7.
https://bugs.winehq.org/show_bug.cgi?id=38021
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #13 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 4.2.