[Bug 46319] New: 32-bit IL-only executable launched as 32-bit subprocess on Wine and 64-bit subprocess on Windows
https://bugs.winehq.org/show_bug.cgi?id=46319 Bug ID: 46319 Summary: 32-bit IL-only executable launched as 32-bit subprocess on Wine and 64-bit subprocess on Windows Product: Wine Version: 4.0-rc1 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: kernel32 Assignee: wine-bugs(a)winehq.org Reporter: brendan(a)redmandi.com Distribution: --- Created attachment 63052 --> https://bugs.winehq.org/attachment.cgi?id=63052 Allow 32-bit IL-only application to launch as 64-bit process in WIN64 As stated in the summary - when using CreateProcessA to execute a 32-bit .NET/Mono application (which is IL-only) the process is always launched as a 32-bit process under Wine; but under Windows it is launched as a 64-bit process. Attached is a proposed patch. The issue can be recreated by running the following: # create mono source cat << 'END' > mono32.cs using Microsoft.Win32; using System.Diagnostics; using System.Reflection; using System.IO; using System; public class Launcher { static public void Main () { RegistryKey rk = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Cryptography"); if (rk != null) { object guid = rk.GetValue("MachineGuid"); if (guid != null) { Console.WriteLine ("it works!"); } else { Console.WriteLine ("guid not found - run as 64-bit process"); } } else { Console.WriteLine("Couldn't find 'HKLM\\SOFTWARE\\Microsoft\\Cryptography'"); } } } END # create 'C' source cat << 'END' > c64.c #include <windows.h> #include <stdio.h> int main(int argc, const char *argv[]) { PROCESS_INFORMATION processInfo; STARTUPINFO startupInfo; memset(&startupInfo, 0, sizeof startupInfo); startupInfo.cb = sizeof startupInfo; // Create the process in suspended state if (!CreateProcessA( NULL, "mono32.exe", // only modified by CreateProcessW 0, // process attributes 0, // thread attributes TRUE, // inherit handles 0, // CREATE_SUSPENDED, NULL, // environment NULL, // current directory &startupInfo, &processInfo)) { DWORD dwLastError = GetLastError(); fprintf(stderr, "failed to execute mono32.exe (%lu)\n", dwLastError); return 1; } return 0; } END # compile mono mcs mono32.cs # compile 'C' x86_64-w64-mingw32-gcc c64.c -o c64.exe # try wine64 (fails under wine without patch) wine64 c64.exe -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46319 Brendan McGrath <brendan(a)redmandi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |minor -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46319 Vincent Povirk <madewokherd(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |madewokherd(a)gmail.com -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46319 Brendan McGrath <brendan(a)redmandi.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9381da9f1c8a685f806b922383c | |7f9356f87d94d Status|UNCONFIRMED |RESOLVED Resolution|--- |FIXED --- Comment #1 from Brendan McGrath <brendan(a)redmandi.com> --- Fixed in 4.2 by commit 9381da9f1c8a685f806b922383c7f9356f87d94d -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46319 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #2 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 4.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46319 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |4.0.x -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=46319 Michael Stefaniuc <mstefani(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|4.0.x |--- --- Comment #3 from Michael Stefaniuc <mstefani(a)winehq.org> --- Removing the 4.0.x milestone from bug fixes included in 4.0.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org