All of lore.kernel.org
 help / color / mirror / Atom feed
From: Consul <void@aleksoft.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: SIGSEGV on Windows with KQEMU enabled
Date: Fri, 13 Mar 2009 10:33:28 -0700	[thread overview]
Message-ID: <gpe5da$4i1$1@ger.gmane.org> (raw)
In-Reply-To: <alpine.DEB.1.00.0903131133150.10279@pacific.mpi-cbg.de>

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	other threads:[~2009-03-13 17:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-07  0:39 [Qemu-devel] SIGSEGV on Windows with KQEMU enabled Consul
2009-03-07  2:51 ` Anthony Liguori
2009-03-13  1:28   ` [Qemu-devel] " Consul
2009-03-13 10:37     ` Johannes Schindelin
2009-03-13 17:33       ` Consul [this message]
2009-03-14 12:16         ` Johannes Schindelin
2009-03-14 12:36           ` Andreas Färber
2009-03-15  0:42           ` Paul Brook
2009-03-15 16:16             ` Stefan Weil
2009-03-15 16:39               ` Avi Kivity
2009-03-16 10:22             ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='gpe5da$4i1$1@ger.gmane.org' \
    --to=void@aleksoft.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.