From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:34859) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SB1Zn-0007oF-0m for qemu-devel@nongnu.org; Fri, 23 Mar 2012 06:18:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SB1Zk-0008BZ-7y for qemu-devel@nongnu.org; Fri, 23 Mar 2012 06:18:30 -0400 Received: from mx1.redhat.com ([209.132.183.28]:23763) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SB1Zk-0008BH-08 for qemu-devel@nongnu.org; Fri, 23 Mar 2012 06:18:28 -0400 Date: Fri, 23 Mar 2012 12:18:20 +0200 From: Alon Levy Message-ID: <20120323101820.GE23394@garlic> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] Spice bug with qemu_name List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Lee Essen Cc: qemu-devel@nongnu.org, kraxel@redhat.com On Fri, Mar 23, 2012 at 08:10:36AM +0000, Lee Essen wrote: > Hi, > > I think I've found a bug with the way that spice uses qemu_name. > > qemu_name is a char *, that's only set to if "-name" is given (and then the arg is strdup'd), otherwise it's not set properly. > > In ui/spice_core.c spice_server_set_name() is called with qemu_name, which if not set causes a core dump. > > ----------------- lwp# 1 / thread# 1 -------------------- What's lwp? > fffffd7fff168090 strlen () + 30 > fffffd7ffa6b5d7e spice_server_set_name () + 2b > 000000000068fab1 qemu_spice_init () + 753 > 000000000062a58f main () + 2a31 > 0000000000519c5c _start () + 6c > ----------------- lwp# 2 / thread# 2 -------------------- > fffffd7fff1f9b2a __sigtimedwait () + a > fffffd7fff1e626d sigwait () + d > fffffd7fff1d1b31 __posix_sigwait () + 31 > 000000000057572c sigwait_compat () + 68 > fffffd7fff1f39a3 _thrp_setup () + 83 > fffffd7fff1f3ca0 _lwp_start () > > There's a similar situation with qemu_uuid, however because it's not a pointer I'm assuming you end up with all zero's, which is probably ok behaviour. > > I haven't provided a patch since I don't really know which way you want to fix this ... either provide a sensible default if it's not set, or default to NULL and check it in the spice code. > > Regards, > > Lee. > >