From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:55601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ6QW-0004yR-OW for qemu-devel@nongnu.org; Thu, 15 Nov 2012 15:52:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TZ6QT-0004EW-Mo for qemu-devel@nongnu.org; Thu, 15 Nov 2012 15:52:44 -0500 Received: from mail-we0-f173.google.com ([74.125.82.173]:63103) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TZ6QT-0004EF-GE for qemu-devel@nongnu.org; Thu, 15 Nov 2012 15:52:41 -0500 Received: by mail-we0-f173.google.com with SMTP id r1so749265wey.4 for ; Thu, 15 Nov 2012 12:52:40 -0800 (PST) Sender: Paolo Bonzini Message-ID: <50A55615.1040003@redhat.com> Date: Thu, 15 Nov 2012 21:52:37 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1351697456-16107-1-git-send-email-pbonzini@redhat.com> <1351697456-16107-6-git-send-email-pbonzini@redhat.com> <50A52E14.2070106@weilnetz.de> In-Reply-To: <50A52E14.2070106@weilnetz.de> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 05/39] fdsets: use weak aliases instead of qemu-tool.c/qemu-user.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Weil Cc: Blue Swirl , aliguori@us.ibm.com, qemu-devel@nongnu.org, stefanha@redhat.com Il 15/11/2012 19:01, Stefan Weil ha scritto: > Hi Paolo, > > this patch breaks QEMU on 32 and 64 bit hosts, native and with Wine. > It's easy to reproduce the SIGSEGV crash: just add a -snapshot option. > Obviously the critical code is executed only when this option was used. I cannot reproduce this, so it must be an assembler or linker bug. Can you try the alternative code that is used for Mac OS X? Paolo > Here is a simple command line using Wine: > > wine i386-softmmu/qemu-system-i386 -L pc-bios -snapshot Makefile > > The disk image does not matter, so I just selected QEMU's Makefile. > > It looks like weak symbols are not really working with MinGW > (Blue Swirl previously pointed out that only ELF and a.out are > officially supported). > > I can see in the debugger that QEMU wants to call monitor_fdset_dup_fd_find > from qemu_close. > > In previous versions, this was just a dummy function returning 0. > Now, it is the function in monitor.c, but the address does not match > exactly, so the code addresses lines near the beginning of > monitor_fdset_dup_fd_find which does not work of course. > > A trivial workaround is calling default_fdset_dup_fd_find which > restores the old behaviour. I expect that all other weak functions > would show the same problem if they were used. > > Regards, > > Stefan > >