qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Re: SIGSEGV on Windows with KQEMU enabled


From: Johannes Schindelin
Subject: Re: [Qemu-devel] Re: SIGSEGV on Windows with KQEMU enabled
Date: Fri, 13 Mar 2009 11:37:59 +0100 (CET)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

Hi,

On Thu, 12 Mar 2009, Consul wrote:

> Anthony Liguori wrote:
> > Consul wrote:
> > > First, the current SVN (6731) does not compile on Windows due to 
> > > missing asprintf.
> > 
> > With what toolkit?  It builds for me.
> 
> The SIGSEGV has been introduced in rev 6712 (monitor.c). The current 
> version (6826 with the asprintf patch) is still affected. It only 
> happens if:
> 
> 1. compiled with GCC4
> 
> gcc.exe (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502
> ln (GNU coreutils) 5.97
> 
> 2. kqemu is enabled (either user or kernel modes).

Funnily enough, I have a similar issue in another project.  Could you try 
compiling with --std=c99?

Alternatively, you might want to try to

#define snprintf __mingw_snprintf
#define vsnprintf __mingw_vsnprintf

in a central place.

Explanation: M$' C runtime is not C99 compliant.  It interprets %llu to 
mean "unsigned long", not "unsigned long long".  As a consequence, the 
bitwidths of the parameters are interpreted wrong, so that pointers after 
that parameter point anywhere but the correct address.

As far as I can tell, TDM's GCC works around most of the issue, but forgot 
snprintf and vsnprintf.

You might also be interested in this:

https://sourceforge.net/tracker/index.php?func=detail&aid=2671742&group_id=200665&atid=974439

Hth,
Dscho





reply via email to

[Prev in Thread] Current Thread [Next in Thread]