From: Consul <void@aleksoft.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] SIGSEGV on Windows with KQEMU enabled
Date: Fri, 06 Mar 2009 16:39:28 -0800 [thread overview]
Message-ID: <gosfo1$575$1@ger.gmane.org> (raw)
First, the current SVN (6731) does not compile on Windows due to missing asprintf.
This hack lets me compile the app, but running a Windows XP image gives SIGSEGV during the boot.
As Robert mentioned in another thread it might be a binutils bug after all - I'm using 2.19 -
but it might be as well a kqemu bug. The crash happens in kqemu.c. See the trace below.
Note: SIGSEGV does not happens with -no-kqemu
===================================================================
--- vnc.c (revision 6731)
+++ vnc.c (working copy)
@@ -62,10 +62,14 @@
err, gai_strerror(err));
return NULL;
}
-
+#ifndef _WIN32
if (asprintf(&addr, format, host, serv) < 0)
return NULL;
-
+#else
+ if (!(addr = malloc(512)))
+ return NULL;
+ sprintf(addr, format, host, serv);
+#endif
return addr;
}
===================================================================
Starting program: c:\test\qemu/i386-softmmu/qemu.exe -L c:\qemu-dist -hda c:\qemu-img\wxp.q2 -fda c:\qemu-img\boot.bin -boot c -localtime -m 512 -soundhw es1370 -net nic,model=rtl8139 -net tap,ifname=TAP0 -kernel-kqemu
[New thread 3488.0xd48]
[New thread 3488.0xde0]
[New thread 3488.0xcb0]
[New thread 3488.0xfb0]
[New thread 3488.0xba8]
[New thread 3488.0x3bc]
[New thread 3488.0x484]
Program received signal SIGSEGV, Segmentation fault.
kqemu_cpu_exec (env=0x2ef9eff8) at c:/test/qemu/kqemu.c:475
475 asm volatile ("fxrstor %0" : "=m" (*fp));
(gdb) bt
#0 kqemu_cpu_exec (env=0x2ef9eff8) at c:/test/qemu/kqemu.c:475
#1 0x004ac1e6 in cpu_x86_exec (env1=0x806ef000)
at c:/test/qemu/cpu-exec.c:317
#2 0x00407f38 in qemu_get_timedate (tm=<value optimized out>, offset=1)
at c:/test/qemu/vl.c:1816
#3 0x00000000 in ?? ()
(gdb)
next reply other threads:[~2009-03-07 0:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-07 0:39 Consul [this message]
2009-03-07 2:51 ` [Qemu-devel] SIGSEGV on Windows with KQEMU enabled Anthony Liguori
2009-03-13 1:28 ` [Qemu-devel] " Consul
2009-03-13 10:37 ` Johannes Schindelin
2009-03-13 17:33 ` Consul
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='gosfo1$575$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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).