https://bugs.winehq.org/show_bug.cgi?id=45081
Bug ID: 45081 Summary: Expanded FakeDLL support changed behaviour of stubs for A/W symbols Product: Wine-staging Version: 3.6 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs@winehq.org Reporter: Paul.Hampson@Pobox.com CC: erich.e.hoover@wine-staging.com, michael@fds-team.de, sebastian@fds-team.de Distribution: ---
Created attachment 61234 --> https://bugs.winehq.org/attachment.cgi?id=61234 Report the results of GetProcAddress for three variations of the intersting symbol
While looking into issues with running current Cygwin on current Wine, an error was raised under Wine Staging 3.6:
fatal error - couldn't dynamically determine load address for 'DsEnumerateDomainTrustsW' (handle 0x7F1E632A0000), Win32 error 127
This doesn't happen either natively or with Wine 2.4 (Staging)
Looking into it, it appears the current netapi32.spec has:
@ stub DsEnumerateDomainTrusts
Given the near-trivial code attached, the behaviour difference is clear.
Windows (Windows 10 1709): DsEnumerateDomainTrusts not found DsEnumerateDomainTrustsA found DsEnumerateDomainTrustsW found
Wine 2.4 (Staging) and 3.6 (Staging): DsEnumerateDomainTrusts found DsEnumerateDomainTrustsA not found DsEnumerateDomainTrustsW not found
The weird thing is that Wine 2.4 worked in Cygwin, when clearly nothing has apparently changed for this particular DLL export code-wise since 2005.
I believe this is to do with the patches in Wine Staging (https://github.com/wine-staging/wine-staging/tree/master/patches/winebuild-F...) which have surfaced a class of previously-hidden issues in Wine.
I haven't worked out where yet, but I suspect that the Fake_DLLs are breaking some kind of Wine magic which lets the unadorned symbols for stubs also respond to a lookup for the adorned symbols.
Otherwise, I expect we'd see a lot more pairs like this: @ stub DsEnumerateDomainTrustsA @ stub DsEnumerateDomainTrustsW
I'm surprised such a change hasn't seen more issues but I was unable to find any references to it on this Bugzilla or by searching Google.
ReactOS have a trivial patch which turns them from spec-stubs to code-stubs, and hence corrects the exports etc: https://jira.reactos.org/browse/CORE-11056 and that would make sense for Wine.
All Wine installations here are on Ubuntu 14.04 from winehq packages, in Docker images built from https://github.com/TBBle/wine_msys64
https://bugs.winehq.org/show_bug.cgi?id=45081
--- Comment #1 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com --- I forgot to mention, that there is more info (links to source, etc) in the 'Fourth Edit' of https://github.com/Alexpux/MSYS2-packages/issues/682#issuecomment-385144098
This came up while attempting to fix the Cygwin issue which was reported to Wine as bug 40528
https://bugs.winehq.org/show_bug.cgi?id=45081
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |austinenglish@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=45081
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 CC| |leslie_alistair@hotmail.com Component|-unknown |netapi32 Product|Wine-staging |Wine Status|UNCONFIRMED |NEW
--- Comment #2 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- The doesn't appear to be a specific wine-staging issue - moving to wine.
If you run the same test under wine, the same issue would occur.
The updating the spec file is the correct approach. However the reactos sepc file patch isn't correct in terms of the DsEnumerateDomainTrustsA, first argument should be "str" not "wstr".
The original patch 45f0e0625e107966da9919f1863ca376d9b55b3a for when this was introduced hasn't been touched in 10 years.
https://bugs.winehq.org/show_bug.cgi?id=45081
--- Comment #3 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com --- I confirmed with WineHQ-devel on Ubuntu 16.04 under Windows Subsystem for Linux that the output from getproc.exe is the same under Wine 3.7.
I'd need to get a build environment set up here, but I expect the simple fix will be to just change the spec file to list
@ stub DsEnumerateDomainTrustsA @ stub DsEnumerateDomainTrustsW
since apparently no one's ever needed the implementation.
https://bugs.winehq.org/show_bug.cgi?id=45081
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- (In reply to Paul "TBBle" Hampson from comment #3)
I confirmed with WineHQ-devel on Ubuntu 16.04 under Windows Subsystem for Linux that the output from getproc.exe is the same under Wine 3.7.
I'd need to get a build environment set up here, but I expect the simple fix will be to just change the spec file to list
@ stub DsEnumerateDomainTrustsA @ stub DsEnumerateDomainTrustsW
since apparently no one's ever needed the implementation.
I've sent a patch https://source.winehq.org/patches/data/145400
https://bugs.winehq.org/show_bug.cgi?id=45081
Paul "TBBle" Hampson Paul.Hampson@Pobox.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|Expanded FakeDLL support |DsEnumerateDomainTrusts |changed behaviour of stubs |stubbed without A/W suffix |for A/W symbols |
https://bugs.winehq.org/show_bug.cgi?id=45081
--- Comment #5 from Paul "TBBle" Hampson Paul.Hampson@Pobox.com --- Awesome, thank you.
Next time I play with this, I'll get a build environment set up so I can test changes locally.
In the meantime, *this* ticket is done if-and-when that patch is merged.
Anyone coming along later, https://github.com/Alexpux/MSYS2-packages/issues/682 is likely to be the next jumping-off point.
https://bugs.winehq.org/show_bug.cgi?id=45081
tokktokk fdsfgs@krutt.org changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |fdsfgs@krutt.org
https://bugs.winehq.org/show_bug.cgi?id=45081
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |07e41e4c9ba913d895e50715ff8 | |cc70bd6f9d855 Status|NEW |RESOLVED Resolution|--- |FIXED
--- Comment #6 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by https://source.winehq.org/git/wine.git/?a=commit;h=07e41e4c9ba913d895e50715f...
https://bugs.winehq.org/show_bug.cgi?id=45081
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #7 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 3.8.
https://bugs.winehq.org/show_bug.cgi?id=45081
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |3.0.x
https://bugs.winehq.org/show_bug.cgi?id=45081
Michael Stefaniuc mstefani@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|3.0.x |---
--- Comment #8 from Michael Stefaniuc mstefani@winehq.org --- Removing the 3.0.x milestone from bugs included in 3.0.3.