[Bug 17123] WinAVR: make command fails with Interrupt/Exception caught

wine-bugs at winehq.org wine-bugs at winehq.org
Sat Jan 24 18:09:29 CST 2009


http://bugs.winehq.org/show_bug.cgi?id=17123





--- Comment #1 from Bernhard Übelacker <bernhardu at 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.


More information about the wine-bugs mailing list