http://bugs.winehq.org/show_bug.cgi?id=17031
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|-unknown |msvcrt Ever Confirmed|0 |1
--- Comment #6 from Dan Kegel dank@kegel.com 2009-01-19 17:57:58 --- OK, so: to reproduce:
0. compile the popen test using mingw32, sudo apt-get install mingw32 i586-mingw32msvc-gcc popen.c 1. install msys and mingw from http://mingw.org 2. cd .wine/drive_c/msys/1.0; wine cmd /c msys.bat 3. in the rxvt window that starts up, run the a.exe compiled in step 0 The stack dump shows up in the rxvt window. The crash occurs because popen returns NULL.
To learn more, I did WINEDEBUG=+process,+relay ./a.out in the rxvt window; that caused debug output to come out nicely in the shell where I had started msysm. The log seems to show that popen() is passing the commandline to cmd.exe, which doesn't know what to make of it, and can't execute the requested command.
I tried changing the test to use f = popen("echo world", "r"); and that seemed to make more sense in the +process log, trace:process:CreateProcessW app L"C:\windows\system32\cmd.exe" cmdline L"C:\windows\system32\cmd.exe /c echo world" but popen still returns null.
At this point I realized that the popen in question is msvcrt's. I'll attach the +relay,+process,+msvcrt log, which shows the popen failure. Running with "winetricks vcrun6" and then overriding msvcrt lets my modified test program popen("echo hello") properly, so this part looks like a bona fide msvcrt wine bug.