https://bugs.winehq.org/show_bug.cgi?id=39439
Bug ID: 39439 Summary: calling CreateProcess from windows code on a program binary mounted with noexec crashes wine Product: Wine Version: 1.7.51 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs@winehq.org Reporter: hramrach@gmail.com Distribution: ---
I moved a windows application from a failed disk partition to a flash drive.
I mounted the flash drive using pmount which adds the noexec flag.
Executing the application as in
wine ./Client.exe works.
However, the application also spawns Client.bin (presumably using CreateProcess) and that binary crashes on start when spawned from noexec filesystem. It raises an exception very early in Wine code so I guess the application is in no position to catch it. And it raises it in the spawned application, not the spawning application. The Client.bin itself is not executable (as in +x mode).
I can add traces if needed but this should be easy to reproduce.
I see multiple related problems here
1) wine does not check the noexec flag when loading a binary initially from the commandline but does check it (or uses a library function that does) when a windows application calls spawn or clone or whatever - inconsistency
2) wine checks the noexec in the wrong place - it should check before performing CreateProcess and report error in the calling application but it fails executing the created process and crashes
3) when wine fails executing an application due to the noexec flag it should produce an intelligible error message rather than crash
https://bugs.winehq.org/show_bug.cgi?id=39439
Nikolay Sivov bunglehead@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|kernel32 |-unknown
https://bugs.winehq.org/show_bug.cgi?id=39439
Sebastian Lackner sebastian@fds-team.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |sebastian@fds-team.de
https://bugs.winehq.org/show_bug.cgi?id=39439
--- Comment #1 from Michal Suchanek hramrach@gmail.com --- Created attachment 52557 --> https://bugs.winehq.org/attachment.cgi?id=52557 wine crash log
ok, so I tried to build the MSDN CreateProcess example and it does *not* reproduce the crash so traces of the actual application are needed.
Attaching the stuff Wine logs in the console when it crashes.
https://bugs.winehq.org/show_bug.cgi?id=39439
Michal Suchanek hramrach@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|calling CreateProcess from |spawning new process from |windows code on a program |windows code on a program |binary mounted with noexec |binary mounted with noexec |crashes wine |sometimes crashes wine
https://bugs.winehq.org/show_bug.cgi?id=39439
Michal Suchanek hramrach@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #52557|0 |1 is obsolete| |
--- Comment #2 from Michal Suchanek hramrach@gmail.com --- Created attachment 52558 --> https://bugs.winehq.org/attachment.cgi?id=52558 wine crash log with emulated msvcr80
I noticed I have vcrun2005 installed but removing the native library preference does not change the log substantially.