From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH] libxl: initialize vfb defbools in libxlMakeVfb Date: Wed, 6 May 2015 10:24:54 +0200 Message-ID: <20150506082454.GB10182__1317.07192999801$1430901197$gmane$org@aepfle.de> References: <1429291171-23640-1-git-send-email-olaf@aepfle.de> <20150417175928.GA2516@aepfle.de> <553165B7.8000204@suse.com> <1430487940.15640.32.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1430487940.15640.32.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: libvir-list@redhat.com, Jim Fehlig , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On Fri, May 01, Ian Campbell wrote: > Olaf, please can you use gdb to capture the stack trace so we can fix > this (and the other issue) properly in libxl instead of just hacking > around it in libvirt (which might also be appropriate for compat with > old libxl but shouldn't be done without also fixing libxl IMHO). The code flow was essentially like this: libxl_device_vfb_init(libxl); switch(libvirt->type) { case SDL: libxl_defbool_set(libxl->sdl.enable, 1); break; case VNC: libxl_defbool_set(libxl->vnc.enable, 1); break; } if (libvirt->os.type == HVM) { if (libxl_defbool_val(libxl->vnc.enable)) { /* do VNC things */ } else if (libxl_defbool_val(libxl->sdl.enable)) { /* do SDL things */ if (libxl_defbool_val(libxl->opengl.enable)) /* do openGL things */ } } The first crash was because I had SDL enabled, and the SDL case did not initialize the defbool for VNC. Once it did the next crash was the openGL part which was not initialized either. I see nothing wrong with libxl in such usage. Olaf