[Mono-bugs] [Bug 400445] New: Compiling under MSVC 2005 (v 8.+)

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 16 02:21:30 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=400445


           Summary: Compiling under MSVC 2005 (v 8.+)
           Product: Mono: Runtime
           Version: SVN
          Platform: i686
        OS/Version: Windows Vista
            Status: NEW
          Severity: Major
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: migelU at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Development


Since MS change behavior of the vsnprintf function eglib routines raises
segfault exception when mono runtime outputs traces, logs, and warnings. (DAMN
on it!)
here is simple patch vasprintf.c
int vasprintf(char **ret, const char *fmt, va_list ap)
{
char *buf;
int len;
size_t buflen;
va_list ap2;

#ifdef _MSC_VER
ap2 = ap;
len = _vscprintf(fmt, ap2); // NOTE MS specific extension ( :-( )
#else
va_copy(ap2, ap);
len = vsnprintf(NULL, 0, fmt, ap2);
#endif


if (len > 0 && (buf = malloc((buflen = (size_t) (len + 1)))) != NULL) {
len = vsnprintf(buf, buflen, fmt, ap);
*ret = buf;
} else {
*ret = NULL;
len = -1;
}

va_end(ap2);
return len;
}


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list