qemu-devel
[Top][All Lists]
Advanced

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

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


From: Consul
Subject: [Qemu-devel] Re: SIGSEGV on Windows with KQEMU enabled
Date: Fri, 13 Mar 2009 10:33:28 -0700
User-agent: Thunderbird 2.0.0.19 (Windows/20081209)

Johannes Schindelin wrote:

compiling with --std=c99?

with -std=c99 it does not even compile


Alternatively, you might want to try to

#define snprintf __mingw_snprintf
#define vsnprintf __mingw_vsnprintf


These give linker undefined symbol errors.

But really funny think is the change that triggers the bug is precisely this:
-Monitor *cur_mon;
+Monitor *cur_mon = NULL;

Obviously, kqemu is happier having garbage in the cur_mon than NULL


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]