From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LfkZq-00057Q-Sm for qemu-devel@nongnu.org; Fri, 06 Mar 2009 19:39:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LfkZp-000575-GA for qemu-devel@nongnu.org; Fri, 06 Mar 2009 19:39:41 -0500 Received: from [199.232.76.173] (port=55804 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LfkZp-000571-9n for qemu-devel@nongnu.org; Fri, 06 Mar 2009 19:39:41 -0500 Received: from main.gmane.org ([80.91.229.2]:39804 helo=ciao.gmane.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LfkZo-0002sH-GI for qemu-devel@nongnu.org; Fri, 06 Mar 2009 19:39:40 -0500 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1LfkZm-00075B-6Q for qemu-devel@nongnu.org; Sat, 07 Mar 2009 00:39:38 +0000 Received: from 204.147.152.1 ([204.147.152.1]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Mar 2009 00:39:38 +0000 Received: from void by 204.147.152.1 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 07 Mar 2009 00:39:38 +0000 From: Consul Date: Fri, 06 Mar 2009 16:39:28 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: news Subject: [Qemu-devel] SIGSEGV on Windows with KQEMU enabled Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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=, offset=1) at c:/test/qemu/vl.c:1816 #3 0x00000000 in ?? () (gdb)