All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Olaf Hering <olaf@aepfle.de>
Cc: libvir-list@redhat.com, Jim Fehlig <jfehlig@suse.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH] libxl: initialize vfb defbools in libxlMakeVfb
Date: Mon, 20 Apr 2015 10:43:30 +0100	[thread overview]
Message-ID: <1429523010.25195.397.camel@citrix.com> (raw)
In-Reply-To: <20150420093239.GA14169@aepfle.de>

On Mon, 2015-04-20 at 11:32 +0200, Olaf Hering wrote:
> On Mon, Apr 20, Ian Campbell wrote:
> 
> > On Fri, 2015-04-17 at 13:40 -0600, Jim Fehlig wrote:
> > > On 04/17/2015 11:19 AM, Olaf Hering wrote:
> > > > If the domU configu has sdl enabled libvirtd crashes:
> > > > libvirtd[5158]: libvirtd: libxl.c:343: libxl_defbool_val: Assertion `!libxl_defbool_is_default(db)' failed.
> > > 
> > > The assertion seems harsh considering the offense...
> > 
> > libxl should be setting a default for this value if the application
> > hasn't, by calling libxl__device_vfb_setdefault at some correct point.
> 
> This is an internal function. Its up to the caller of
> libxl_device_vfb_init to initialize the defbool members.

No, it isn't. It's up to libxl to call libxl__device_vfb_setdefault
somewhere on the code path between entering the library and actually
using this defbool. (Possibly indirectly via the containing struct in
this case)

We normally do this as close to entry into the library as we can, e.g.
in the libxl_device_FOO_add or e.g. in libxl_domain_create.

It is always a libxl bug if a defbool gets used without having had a
defaulted value applied by the library first, hence the assert.

If what you said were true then an assert would be a rather harsh
overreaction to an application coding error.

Ian.

  reply	other threads:[~2015-04-20  9:43 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1429291171-23640-1-git-send-email-olaf@aepfle.de>
2015-04-17 17:59 ` [PATCH] libxl: initialize vfb defbools in libxlMakeVfb Olaf Hering
2015-04-17 19:40 ` Jim Fehlig
     [not found] ` <20150417175928.GA2516@aepfle.de>
2015-04-17 19:57   ` Jim Fehlig
2015-04-18  6:50     ` Olaf Hering
2015-05-01 13:45     ` Ian Campbell
     [not found]     ` <1430487940.15640.32.camel@citrix.com>
2015-05-01 15:10       ` Jim Fehlig
2015-05-05 12:01         ` Ian Campbell
2015-05-06  8:24       ` Olaf Hering
     [not found]       ` <20150506082454.GB10182@aepfle.de>
2015-05-06  9:08         ` Ian Campbell
     [not found]         ` <1430903289.2660.169.camel@citrix.com>
2015-05-06  9:15           ` Ian Campbell
2015-05-06  9:18           ` Olaf Hering
2015-04-24 20:19   ` Jim Fehlig
     [not found] ` <553161CA.2090906@suse.com>
2015-04-18  6:47   ` Olaf Hering
2015-04-20  8:39   ` Ian Campbell
2015-04-20  9:32     ` Olaf Hering
2015-04-20  9:43       ` Ian Campbell [this message]
2015-04-20 10:20         ` Olaf Hering
2015-04-20 10:25           ` Ian Campbell
2015-04-20 10:32             ` Olaf Hering
2015-04-20 11:10               ` Ian Campbell
     [not found]   ` <20150418064723.GA2488@aepfle.de>
2015-04-24 20:05     ` Jim Fehlig
2015-04-17 17:19 Olaf Hering

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=1429523010.25195.397.camel@citrix.com \
    --to=ian.campbell@citrix.com \
    --cc=jfehlig@suse.com \
    --cc=libvir-list@redhat.com \
    --cc=olaf@aepfle.de \
    --cc=xen-devel@lists.xen.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.