[Bug 17123] New: WinAVR: make command fails with Interrupt/Exception caught
http://bugs.winehq.org/show_bug.cgi?id=17123 Summary: WinAVR: make command fails with Interrupt/Exception caught Product: Wine Version: 1.1.13 Platform: PC URL: http://winavr.sourceforge.net OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: msvcrt AssignedTo: wine-bugs(a)winehq.org ReportedBy: bernhardu(a)vr-web.de Created an attachment (id=18970) --> (http://bugs.winehq.org/attachment.cgi?id=18970) Output from 'wine winedbg make' Trying to build a simple project results in a crash in make.exe. make: Interrupt/Exception caught (code = 0xc0000005, addr = 0xb7cb2c15) This is a mingw build from GNU make. A call to "wine make clean" runs without problem. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 --- Comment #1 from Bernhard Übelacker <bernhardu(a)vr-web.de> 2009-01-24 18:09:29 --- The crash is actually in MSVCRT_fwrite if(file->_cnt) { int pcnt=(file->_cnt>wrcnt)? wrcnt: file->_cnt; memcpy(file->_ptr, ptr, pcnt); It is happening because file->_cnt contains 0xffffffff. This is because make calls in misc.c after the first (not crashing) vfprintf a putchar ('\n'); This got probably inlined so not the msvcr version is used but the mingw implementation in it's stdio.h __CRT_INLINE int __cdecl __MINGW_NOTHROW putchar(int __c) { return (--stdout->_cnt >= 0) ? (int) (unsigned char) (*stdout->_ptr++ = (char)__c) : _flsbuf (__c, stdout);} At least in a Windows XP the call to _flsbuf corrects this 0xffffffff to 0 in this case. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 --- Comment #2 from Bernhard Übelacker <bernhardu(a)vr-web.de> 2009-01-24 19:11:48 --- Created an attachment (id=18973) --> (http://bugs.winehq.org/attachment.cgi?id=18973) A patch and test case which sets in _flsbuf the file->_cnt to 0 With this change the make command runs. There is still a problem with the child processes. I'm not sure when exactly to set flag->_cnt to 0. (Also is in MSVCRT_fwrite memcpy(file->_ptr, ptr, pcnt); is there check needed if file->_ptr is a valid pointer?) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, patch, source, | |testcase -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 --- Comment #3 from Juan Lang <juan_lang(a)yahoo.com> 2009-01-26 11:06:23 --- (In reply to comment #2)
Created an attachment (id=18973) --> (http://bugs.winehq.org/attachment.cgi?id=18973) [details] A patch and test case which sets in _flsbuf the file->_cnt to 0
This looks reasonable, even though it is working around a MinGW bug ;-) Could you send to wine-patches, or if you're not sure about it, solicit feedback on wine-devel? Patches aren't picked up here.
I'm not sure when exactly to set flag->_cnt to 0.
It looks as though it's set to 0 whenever there's no buffered output, so your patch looks correct in this respect.
(Also is in MSVCRT_fwrite memcpy(file->_ptr, ptr, pcnt); is there check needed if file->_ptr is a valid pointer?)
I don't think so. From reading file.c, it seems as though it's assumed that file->_ptr must be valid if file->_cnt is non-zero. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 Dan Kegel <dank(a)kegel.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dank(a)kegel.com Status|UNCONFIRMED |ASSIGNED Ever Confirmed|0 |1 --- Comment #4 from Dan Kegel <dank(a)kegel.com> 2009-01-29 00:03:34 --- Simplified / slightly different patch posted, http://www.winehq.org/pipermail/wine-patches/2009-January/068561.html Thanks! -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 --- Comment #5 from Austin English <austinenglish(a)gmail.com> 2009-01-29 10:10:15 --- Patch was committed: http://source.winehq.org/git/wine.git/?a=commitdiff;h=5bf1ae82f19b915e75f12e... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |NEW --- Comment #6 from Nikolay Sivov <bunglehead(a)gmail.com> 2010-01-08 14:49:05 --- (In reply to comment #5)
Patch was committed:
http://source.winehq.org/git/wine.git/?a=commitdiff;h=5bf1ae82f19b915e75f12e...
Please test again with 1.1.36. Patch was committed eleven months ago. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 --- Comment #7 from Bernhard Übelacker <bernhardu(a)vr-web.de> 2010-01-09 08:20:41 --- I can confirm that this crash does not happen anymore in wine-1.1.14 and wine-1.1.36. (I am sorry, I was not aware that I have to confirm the fix to close this bug.) -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #8 from Nikolay Sivov <bunglehead(a)gmail.com> 2010-01-09 08:22:37 --- (In reply to comment #7)
I can confirm that this crash does not happen anymore in wine-1.1.14 and wine-1.1.36.
(I am sorry, I was not aware that I have to confirm the fix to close this bug.)
Ok. Marking fixed. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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.
http://bugs.winehq.org/show_bug.cgi?id=17123 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> 2010-01-22 11:02:04 --- Closing bugs fixed in 1.1.37. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email 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