https://bugs.winehq.org/show_bug.cgi?id=49626
Bug ID: 49626 Summary: ntdll can be loaded multiple times into the same process Product: Wine Version: 5.13 Hardware: x86 OS: Linux Status: NEW Severity: normal Priority: P2 Component: ntdll Assignee: wine-bugs@winehq.org Reporter: madewokherd@gmail.com Distribution: ---
The simplest way I've found to reproduce this is to install Python for windows and run: wine python -c 'print(__import__("ctypes").windll.kernel32.LoadLibraryW(r"c:\ntdll.dll"))'
This should show 0, indicating failure, but on Wine it returns a real module handle, different from the ntdll originally loaded in the process.
Worse, the new ntdll isn't initialized properly by ntdll.so, so its functions don't work.
This affects wine-mono, which tries to load ntdll from the application path first, apparently expecting that to fail. Anything using an ntdll p/invoke, such as enumerating files, won't work. This causes the run-tests.exe wrapper (from https://github.com/madewokherd/wine-mono/releases) to crash.
https://bugs.winehq.org/show_bug.cgi?id=49626
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- URL| |https://github.com/madewokh | |erd/wine-mono/releases/down | |load/wine-mono-5.1.0/wine-m | |ono-5.1.0-tests.zip CC| |madewokherd@gmail.com Keywords| |download, regression, | |source, testcase
https://bugs.winehq.org/show_bug.cgi?id=49626
--- Comment #1 from Esme Povirk madewokherd@gmail.com --- Created attachment 67823 --> https://bugs.winehq.org/attachment.cgi?id=67823 work-around for Wine Mono
Here's a patch that works around it in Wine Mono.
https://bugs.winehq.org/show_bug.cgi?id=49626
Andrew Eikum aeikum@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |aeikum@codeweavers.com
https://bugs.winehq.org/show_bug.cgi?id=49626
Jactry Zeng jactry92@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jactry92@gmail.com
https://bugs.winehq.org/show_bug.cgi?id=49626
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |tijs@familiebeek.eu
--- Comment #2 from Esme Povirk madewokherd@gmail.com --- *** Bug 49634 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=49626
--- Comment #3 from Esme Povirk madewokherd@gmail.com --- It seems like loading c:\ntdll.dll actually did succeed earlier, but it returned the same handle already in the process.
https://bugs.winehq.org/show_bug.cgi?id=49626
--- Comment #4 from Jactry Zeng jactry92@gmail.com --- Is this fixed by https://source.winehq.org/git/wine.git/?a=commit;h=b7e51a1653320d06a9c04f53d... ?
https://bugs.winehq.org/show_bug.cgi?id=49626
Esme Povirk madewokherd@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|NEW |RESOLVED Fixed by SHA1| |b7e51a1653320d06a9c04f53d0d | |9e7eda577c31b
--- Comment #5 from Esme Povirk madewokherd@gmail.com --- Yes, it's fixed, thank you.
https://bugs.winehq.org/show_bug.cgi?id=49626
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org --- Closing bugs fixed in 5.14.
https://bugs.winehq.org/show_bug.cgi?id=49626
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |annoywife@gmail.com
--- Comment #7 from Anastasius Focht focht@gmx.net --- *** Bug 49536 has been marked as a duplicate of this bug. ***
https://bugs.winehq.org/show_bug.cgi?id=49626
Anastasius Focht focht@gmx.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |8a169390c9ef4d8a43b604558c4 | |194a052473c0c CC| |focht@gmx.net