http://bugs.winehq.org/show_bug.cgi?id=28258
Summary: cmd/batch.ok fails under WINEDEBUG=warn+heap Product: Wine Version: 1.3.27 Platform: x86 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: cmd AssignedTo: wine-bugs@winehq.org ReportedBy: dank@kegel.com
Here's the log:
$ WINEDEBUG=warn+heap make batch.ok ../../../tools/runtest -q -P wine -M cmd.exe -T ../../.. -p cmd.exe_test.exe.so batch.c && touch batch.ok ... batch.c:301: Test failed: unexpected char 0x5c position 49 in line 229 (got 'CD value Z:\home\dank\wine-git\programs\cmd\tests\foobar', wanted 'CD value @pwd@@or_broken@CD value@space@')
http://bugs.winehq.org/show_bug.cgi?id=28258
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, source CC| |frederic.delanoy@gmail.com
--- Comment #1 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-09-07 09:52:13 CDT --- Minimised file to get the error: test_builtins.cmd: @echo off echo ...stdout redirection mkdir foobar & cd foobar echo foo@tab@1>@tab@foo type foo echo foo7 7> foo type foo echo foo9 9> foo type foo echo foo1> foo type foo echo foo11> foo type foo echo foo12> foo type foo echo1>foo type foo cd .. & rd /s/q foobar cd
test_builtins.cmd.exp ...stdout redirection foo@tab@ foo7@space@@or_broken@foo@tab@ foo9@space@@or_broken@foo@tab@ foo1 foo11 foo12 @pwd@
Redirections handling is a bit messy. This may be related to bugs 28037 (and 21227?)
Ideas welcome ;)
http://bugs.winehq.org/show_bug.cgi?id=28258
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |us@edmeades.me.uk
--- Comment #2 from Jason Edmeades us@edmeades.me.uk 2012-09-04 17:40:15 CDT --- A fun one :-)
The key here is the line "cd .. & rd /s/q foobar"
cd is passed ".. " as the command line and it copies it into a buffer, character by character. It then loops stripping off trailing whitespace, checking we havent walked over the front of the buffer. However the variable which is the front of the buffer is wrong... Without heap+warn, lower in memory so passes, but with heap_warn it isnt, and we fail to remove the space, ending up looking for ".. " as the actual directory name, which FindFirstFile fails to find.
http://bugs.winehq.org/show_bug.cgi?id=28258
--- Comment #3 from Jason Edmeades us@edmeades.me.uk 2012-09-04 18:05:07 CDT --- http://www.winehq.org/pipermail/wine-patches/2012-September/117513.html
http://bugs.winehq.org/show_bug.cgi?id=28258
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #4 from Jason Edmeades us@edmeades.me.uk 2012-09-05 15:41:23 CDT --- http://www.winehq.org/pipermail/wine-cvs/2012-September/089843.html
http://bugs.winehq.org/show_bug.cgi?id=28258
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |9877b53b8cd070dd92d3a4d16b3 | |9343a7283b65c
http://bugs.winehq.org/show_bug.cgi?id=28258
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2012-09-14 13:35:34 CDT --- Closing bugs fixed in 1.5.13.