http://bugs.winehq.org/show_bug.cgi?id=33715
Bug #: 33715 Summary: freopen produces empty file when applied to stdout (regression from wine-1.5.19 to wine-1.5.31) Product: Wine Version: 1.5.31 Platform: x86-64 OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: irwin@beluga.phys.uvic.ca Classification: Unclassified
Created attachment 44648 --> http://bugs.winehq.org/attachment.cgi?id=44648 test case which shows freopen does not work for wine-1.5.31
The issue is illustrated by the attached test_freopen.c file which freopens stdout to the file test_freopen.stdout, then writes "Hello World\n" to stdout. For Wine-1.5.19, the resulting test_freopen.stdout contains the "Hello World\n" test string, but for Wine-1.5.31 (with e5bebe26253f2725141a35f23b6f2e10fc7694d and f565e4a3157d38b50a25fc3b90014474b59fceba reverted to work around bug 33654) that file is empty.
Since stdout is involved, this may be related to bug 33654 which is also a regression between 1.5.19 and 1.5.31 reported by me. However, the current bug is different in the sense that the workaround for bug 33654 (applied above) does not work in this case.
http://bugs.winehq.org/show_bug.cgi?id=33715
--- Comment #1 from Alan W. Irwin irwin@beluga.phys.uvic.ca 2013-06-03 16:05:36 CDT --- git bisect shows the first bad commit between wine-1.5.19 and git HEAD today (caa452e) for this issue was a6daa3519d3e4e753e33fa5591447499622451ea ( msvcrt: Don't duplicate wfsopen functionality in wfrepopen.) That bisect was done without any patching.
The reverse patch for a6daa3519d3e4e753e33fa5591447499622451ea applies cleanly to git HEAD (caa452e) and solves the freopen issue.
http://bugs.winehq.org/show_bug.cgi?id=33715
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, regression, | |testcase Summary|freopen produces empty file |freopen produces empty file |when applied to stdout |when applied to stdout |(regression from | |wine-1.5.19 to wine-1.5.31) |
http://bugs.winehq.org/show_bug.cgi?id=33715
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |a6daa3519d3e4e753e33fa55914 | |47499622451ea
http://bugs.winehq.org/show_bug.cgi?id=33715
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr@codeweavers.com
http://bugs.winehq.org/show_bug.cgi?id=33715
--- Comment #2 from Alan W. Irwin irwin@beluga.phys.uvic.ca 2013-06-03 19:19:37 CDT --- If I apply the reverse patch for a6daa3519d3e4e753e33fa5591447499622451ea to wine-1.5.31 which has already had the two reverse patches applied that are mentioned in bug 33654 as a workaround for that regression, then I can configure, build, test, and install libshape, libqhull, and ndiff software using the combination of CMake/MinGW/MSYS/Wine. These are all fairly small builds, and nothing yet like the large software builds I have completed successfully before for wine-1.5.19. Nevertheless, it is promising that those three reverse patches workaround all regressions (for my software building use case) in recent Wine so far.
http://bugs.winehq.org/show_bug.cgi?id=33715
Piotr Caban piotr.caban@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piotr.caban@gmail.com
--- Comment #3 from Piotr Caban piotr.caban@gmail.com 2013-06-04 16:29:21 CDT --- It's probably fixed. Please retest.
http://bugs.winehq.org/show_bug.cgi?id=33715
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |598ff4dd5a44e1632e9eb2bf6d5 | |9a2a363afe854 Status|UNCONFIRMED |RESOLVED Resolution| |FIXED
--- Comment #4 from Austin English austinenglish@gmail.com 2013-06-04 17:46:09 CDT --- (In reply to comment #3)
It's probably fixed. Please retest.
Yep. http://source.winehq.org/git/wine.git/commitdiff/598ff4dd5a44e1632e9eb2bf6d5...
http://bugs.winehq.org/show_bug.cgi?id=33715
--- Comment #5 from Alan W. Irwin irwin@beluga.phys.uvic.ca 2013-06-05 01:04:50 CDT --- I agree this seems to be the definitive fix for this regression.
If I apply the patch for this fix (http://source.winehq.org/git/wine.git/patch/598ff4dd5a44e1632e9eb2bf6d59a2a3...) on top of wine-1.5.31 which has already had the two reverse patches applied that are mentioned in bug 33654 as a workaround for that regression, then I can configure, build, test, and install libagg, libharu, libshape, libqhull, and ndiff software on the CMake/MinGW/MSYS/Wine platform. Note there are now two additional software builds that are configured by my build script compared to yesterday, and I plan to expand that script to the full set of software that I built (by hand configuration) for wine-1.5.19. So this is an incomplete set of builds compared to what I accomplished before for wine-1.5.19. Nevertheless, it is quite promising that those two reverse patches to workaround the regression given by bug 33654 and this current fix for bug 33715 applied to wine-1.5.31 are giving good software builds on the CMake/MinGW/MSYS/Wine platform so far. Piotr, thanks for your fix here! Furthermore, (assuming you also find a definitive fix for 33654, and my expansion of the Windows build script to additional software packages find no additional regressions) I have good hope that the next unpatched wine release (wine-1.5.32?) will be just as good a platform for software builds as wine-1.5.19 was for me previously.
http://bugs.winehq.org/show_bug.cgi?id=33715
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #6 from Alexandre Julliard julliard@winehq.org 2013-06-07 15:01:30 CDT --- Closing bugs fixed in 1.6-rc1.