http://bugs.winehq.org/show_bug.cgi?id=11073
Summary: crash in kernel32 with lib.exe (VC++6.0) Product: Wine Version: 0.9.52. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: major Priority: P2 Component: kernel32 AssignedTo: wine-bugs@winehq.org ReportedBy: picca@synchrotron-soleil.fr
Created an attachment (id=10092) --> (http://bugs.winehq.org/attachment.cgi?id=10092) crash in lib.exe
Hello
I am using scons with VC6++ to compile a library and with the upgrade 0.9.50-> 0.9.52 it now crash.
I attached the dump of the crash
hope it can help.
Frederic
http://bugs.winehq.org/show_bug.cgi?id=11073
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com
--- Comment #1 from Dan Kegel dank@kegel.com 2008-01-07 06:56:23 --- I can't reproduce the crash here yet. Can you install a wine with debugging symbols (e.g. sudo apt-get install wine-dev, or build from source) and generate the log again so we can see line numbers in the backtrace?lib /nologo /OUT:release\win32\src\hkl.lib release\win32\src\hkl-vector.obj release\win32\src\hkl-matrix.obj release\win32\src\hkl-quaternion.obj release\win32\src\hkl-interval.obj release\win32\src\hkl-source.obj release\win32\src\hkl-axis.obj release\win32\src\hkl-axes.obj release\win32\src\hkl-holder.obj release\win32\src\hkl-holders.obj release\win32\src\hkl-geometry.obj release\win32\src\hkl-diffractometer.obj release\win32\src\hkl-parameter.obj release\win32\src\hkl-lattice.obj release\win32\src\usage.obj
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #2 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-07 07:13:53 --- I got with apt-get install wine-dev but I have no line number in the dump. Can you give me the command line to produce thoses line numbers.
I do >wine cmd then scons on the prompt and debug information appeared on the screan during the link.
thank you
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #3 from Austin English austinenglish@gmail.com 2008-01-07 09:55:06 --- Also, please run a regression test: http://wiki.winehq.org/RegressionTesting
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #4 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-07 10:52:36 --- I tryed a regression test from the 0.9.50 but with my debian testing and valgrind 3.3.0 it is impossible to compile:
here the error message
signal_i386.o: In function `setup_exception': /home/picca/Projets/wine/dlls/ntdll/signal_i386.c:940: undefined reference to `VALGRIND_MAKE_WRITABLE'
http://bugs.winehq.org/show_bug.cgi?id=11073
frédéric Picca picca@synchrotron-soleil.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #10092|0 |1 is obsolete| |
--- Comment #5 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-09 01:49:49 --- Created an attachment (id=10133) --> (http://bugs.winehq.org/attachment.cgi?id=10133) crash with the bissected commit
http://bugs.winehq.org/show_bug.cgi?id=11073
frédéric Picca picca@synchrotron-soleil.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |us@edmeades.me.uk
--- Comment #6 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-09 01:51:55 --- Hello
I made a git bisect after removing valgrind from my computer and I found a problem with this commit: --- 3232e61b9457d2003cfd76df614bf04c38a9bde5 is first bad commit commit 3232e61b9457d2003cfd76df614bf04c38a9bde5 Author: Jason Edmeades us@edmeades.me.uk Date: Mon Feb 26 23:04:16 2007 +0000
cmd.exe: Locate programs more correctly.
:040000 040000 cf8e7c41c71cc626c8bec677a71bec33ac398ecb 0752332ba4a479bca81183f4201db49915aa9510 M programs ---
I attached the dump of the crash with this commit it seems to be at the line 702 of the wcmdmain.c file.
hope it can help
http://bugs.winehq.org/show_bug.cgi?id=11073
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Component|kernel32 |programs Ever Confirmed|0 |1 Keywords| |regression
--- Comment #7 from Dan Kegel dank@kegel.com 2008-01-09 07:41:00 --- Excellent, that should help a lot. That's in cmd, so changing category to 'programs' and adding 'regression' keyword.
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk
--- Comment #8 from Jason Edmeades us@edmeades.me.uk 2008-01-09 09:42:11 --- I'll take a look
Is there any easy way to reproduce this (I can use VC6), as I dont recognize 'scons'?
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #9 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-09 09:49:11 --- To find information about scons (it is a make replacement written in python) http://www.scons.org.
I can send you a tar.gz of my project once you have installed scons on you computer.
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #10 from Jason Edmeades us@edmeades.me.uk 2008-01-09 16:50:22 --- Would you mind attaching a WINEDEBUG=+cmd trace?
(I hope to look at this over the weekend, so if your project is trivial send it over. If its complex, the +cmd trace may tell me most of what I need to know anyway)
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #11 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-10 03:09:30 --- Created an attachment (id=10146) --> (http://bugs.winehq.org/attachment.cgi?id=10146) [0.9.52] WINEDEBUG=+cmd
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #12 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-10 03:10:19 --- I tryed with the bisect version (near 0.9.31) and nothing was printed with the WINEDEBUG=+cmd
But if I use the WINEDEBUG=+cmd on the 0.9.52 debian package (yours not the official from debian), I obtained a lots of log (attached file)
Was cmd instrumented after 0.9.31 for logs ? Or did I miss something when compiling wine. Here my command line for the compilation:
patch -p1 < disable_test.diff && CC="ccache gcc" ./configure && make clean && make depend && make && patch -p1 -R < disable_test.diff
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #13 from Dan Kegel dank@kegel.com 2008-01-10 08:50:03 --- Wine is most definitely still instrumented. Please check your commandline for operator error, e.g. make sure you were in fact setting WINEDEBUG properly when running wine.
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #14 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-10 09:11:59 --- No I was speaking about the cmd program try: git grep -e 'TRACE' 3232e61b -- programs/cmd/wcmdmain.c | wc -l -> 0 no log for the bad commit.
but I agreed git grep -e 'TRACE' wine-0.9.52 -- programs/cmd/wcmdmain.c | wc -l -> 23
Have a nice day.
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #15 from Dan Kegel dank@kegel.com 2008-01-10 09:20:03 --- Oh, sorry. Yeah, it looks like some of the TRACEs were added in July or August of 2007, see http://source.winehq.org/git/wine.git/?a=history;f=programs/cmd/wcmdmain.c for the patches...
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #16 from Jason Edmeades us@edmeades.me.uk 2008-01-10 17:33:29 --- Yep - I added them because the command splitting support made things very complex... The supplied log didnt seem to include the launch of the lib command? Also line 702 must have moved in more recent git - what line no does the current backtrace give?
http://bugs.winehq.org/show_bug.cgi?id=11073
frédéric Picca picca@synchrotron-soleil.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #10146|application/octet-stream |text/plain mime type| |
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #17 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-11 02:46:29 ---
The supplied log didnt seem to include the launch of the lib command?
Yes it does: line number 82 of the [0.9.52] WINEDEBUG=+cmd
702 must have moved in more recent git - what line no does the current backtrace give?
In the master HEAD the line number seems to be 967 but it has changed since the bad commit.
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #18 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-11 03:12:26 --- Created an attachment (id=10168) --> (http://bugs.winehq.org/attachment.cgi?id=10168) projet to help debug
Install python with wine, then scons http://www.scons.org on your computer
This project is a multi platform project so you can build it from a plain linux with gcc or from wine with VC6++
untar the project then use the scons command in the root directory of the project to build it. If every things goes well you must have a series of dots on you screen with each passed test.
On linux no problem.
but if you try to compile with wine (VC6++) it bugs during the link.
good luck
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED
--- Comment #19 from Jason Edmeades us@edmeades.me.uk 2008-01-11 15:56:27 --- Thanks - Got back to my linux box, and can reproduce the problem at will just from the info in the log (I've got your project but wont touch it yet unless however I fix it doesnt work!)... I'll be in touch
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #20 from Jason Edmeades us@edmeades.me.uk 2008-01-14 15:34:46 --- Created an attachment (id=10258) --> (http://bugs.winehq.org/attachment.cgi?id=10258) Patch
The bug was in code I dont really understand, but there is a very trivial and valid fix for this - see attached patch. Note you may need to apply it by hand as its on top of another patch I'll submit at the same time... Please confirm it resolves the problem for you.
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #21 from Jason Edmeades us@edmeades.me.uk 2008-01-14 17:31:51 --- Update: Patch solves the problems but causes another. I need to think about this
eg. "a.bat" - echo a, "a b.bat" - echo a and b
cmd.exe: a - only a : a b - only a : "a b" - a and b cmd.exe /c a b - only a cmd.exe /c "a b" - a and b
Its this last case which breaks with my patch. Currently the code used parameter parsing which strips quotes, so the first 'parameter' is the whole quoted string. It then adds quotes around the lot and passes to run program. My patch doesnt add quotes if there is only one arg (one arg == prevsiouly quoted string, or string with no delimeters in it passed to cmd.exe /c). This, whilst working, breaks the last case above.... Use it as a workaround whilst I think about it!
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #22 from frédéric Picca picca@synchrotron-soleil.fr 2008-01-15 02:36:27 --- (In reply to comment #20)
I tested your patch and it works for me. Great job :)
Thank you very much
Frederic
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #23 from Jason Edmeades us@edmeades.me.uk 2008-03-03 17:17:11 --- Sorry for the delay - patch sent in today
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #24 from Jason Edmeades us@edmeades.me.uk 2008-03-03 17:18:06 --- sorry - wrong bug... still working on this one!
http://bugs.winehq.org/show_bug.cgi?id=11073
Dmitry Timoshkov dmitry@codeweavers.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Summary|crash in kernel32 with |crash in cmd.exe with |lib.exe (VC++6.0) |lib.exe (VC++6.0)
http://bugs.winehq.org/show_bug.cgi?id=11073
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
--- Comment #25 from Austin English austinenglish@gmail.com 2008-06-03 13:07:50 --- Is this still an issue in 1.0-rc3?
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #26 from frédéric Picca picca@synchrotron-soleil.fr 2008-06-03 16:48:15 --- Yes it is :(
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #27 from Austin English austinenglish@gmail.com 2008-12-01 02:01:37 --- Is this still an issue in current (1.1.9 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #28 from Austin English austinenglish@gmail.com 2009-06-02 10:36:54 --- Is this still an issue in current (1.1.22 or newer) wine?
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|us@edmeades.me.uk |wine-bugs@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=11073
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Component|programs |cmd
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #29 from Jason Edmeades us@edmeades.me.uk 2010-01-06 18:26:35 --- Adding myself to the cmd bugs
http://bugs.winehq.org/show_bug.cgi?id=11073
Richard shiningarcanine@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |shiningarcanine@gmail.com
--- Comment #30 from Richard shiningarcanine@gmail.com 2010-06-19 23:19:58 --- What is keeping the patch from being merged into WINE?
http://bugs.winehq.org/show_bug.cgi?id=11073
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW
--- Comment #31 from Dan Kegel dank@kegel.com 2010-06-19 23:33:40 --- Jason found that the patch causes problems (see #21). Hey Jason, can you have another look, and maybe submit some testcases now that we have a test framework?
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk
--- Comment #32 from Jason Edmeades us@edmeades.me.uk 2010-09-06 14:28:14 CDT --- Patch submitted for this bug in tghe patchset starting http://www.winehq.org/pipermail/wine-patches/2010-September/092915.html
Patch set failed on WinNT4 so reworking slightly, but fixes for this defect are included in it.
http://bugs.winehq.org/show_bug.cgi?id=11073
Frédéric Delanoy frederic.delanoy@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic.delanoy@gmail.com
--- Comment #33 from Frédéric Delanoy frederic.delanoy@gmail.com 2011-07-01 18:02:18 CDT --- Does it still occur in current wine (1.3.23)?
http://bugs.winehq.org/show_bug.cgi?id=11073
Henri Verbeet hverbeet@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Regression SHA1| |3232e61b9457d2003cfd76df614 | |bf04c38a9bde5
http://bugs.winehq.org/show_bug.cgi?id=11073
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |adys.wh@gmail.com
--- Comment #34 from Jerome Leclanche adys.wh@gmail.com 2011-11-08 10:01:24 CST --- (In reply to comment #33) Not all patches have been committed, this is probably still in.
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|us@edmeades.me.uk |wine-bugs@winehq.org
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #35 from Saulius K. saulius2@gmail.com 2012-08-31 11:53:07 CDT --- (In reply to comment #34)
(In reply to comment #33) Not all patches have been committed, this is probably still in.
Well, yes: first two of submitted nine were accepted: http://source.winehq.org/git/wine.git/history/4cd2a0e54239973c4205a114d4b347...
Seven patches left off: http://www.winehq.org/pipermail/wine-patches/2010-September/thread.html#9305...
Jason, any ideas on the rejecting reasons? And are you going to continue in nearest future?
http://bugs.winehq.org/show_bug.cgi?id=11073
--- Comment #36 from Jason Edmeades us@edmeades.me.uk 2012-09-01 04:50:24 CDT --- Patch 2 was rejected because I used ProcMon to verify after I'd fixed it how Windows did it, and so I am not allowed to fix that problem. All the patches after that are probably fine but never got resubmitted (I got a bit dejected...). Any of patch 3 onwards can be safely resubmitted if they still apply although patch 2 did rework chunks of code so one or two might not work anymore.
I've just got a new Linux VM installed and was experimenting with fixing one or two cmd bugs, but I have such a small amount of free time that I cant promise anything...
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #37 from Jason Edmeades us@edmeades.me.uk 2012-11-19 15:23:34 CST --- I've just been reinvestigating this bug, which I could previously trivially reproduce earlier using the command logged in the +cmd attachment, as it overflowed some buffer somewhere... (cmd.exe /c "<very long lib statement with parms>"
I've just tried a few times to reproduce this without success so I believe one of the recent changes has fixed this. I changed the cmd.exe logic to handle the /C and /S options better, including its buffer management, and its likely I've 'accidentally' fixed this in a different way to the previous patch set.
Frederic - Are you still in a position to test this?
I'll close it as fixed, since I definitely could reproduce it and now I cant, but if you can reproduce it please attach another +cmd trace and I'll take a (quicker!) look.
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |
--- Comment #38 from Jason Edmeades us@edmeades.me.uk 2012-11-19 15:26:16 CST --- Why oh why is it, after spending ages looking into a problem without managing to reproduce it, I hit the nail on the head about 10 seconds after closing the bug...
Problem does not occur when command line is in batch, nor when cmd.exe /C "..." is run from within a command shell, but does occur when its all run as wine cmd.exe /C "..." (where ... is the full lib line)
Investigating...
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |us@edmeades.me.uk
--- Comment #39 from Jason Edmeades us@edmeades.me.uk 2012-11-19 16:38:03 CST --- Problem is heap corruption if a single parameter is > MAX_PATH characters, because that's the length of the static buffer in WCMD_Parameter.
This fixes the problem: - static WCHAR param[MAX_PATH]; + static WCHAR param[MAXSTRING];
Have a patch in my queue, will be sent in with my next batch.
http://bugs.winehq.org/show_bug.cgi?id=11073
Jason Edmeades us@edmeades.me.uk changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |d71f5c9483b87e16ce36e9d9925 | |41c8968cb1d47 Status|REOPENED |RESOLVED Resolution| |FIXED
--- Comment #40 from Jason Edmeades us@edmeades.me.uk 2012-11-27 14:59:43 CST --- Fixed, I hope :-)
http://bugs.winehq.org/show_bug.cgi?id=11073
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #41 from Alexandre Julliard julliard@winehq.org 2012-12-07 13:36:16 CST --- Closing bugs fixed in 1.5.19.