All of lore.kernel.org
 help / color / mirror / Atom feed
* Possible bug in XendConfig.py
@ 2011-06-17 11:04 Alexander Fittkau
  2011-06-20 14:31 ` Ian Jackson
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Fittkau @ 2011-06-17 11:04 UTC (permalink / raw)
  To: xen-devel

Hi, all!

While poking around in various Xend*.py sources (Xen 4.0.1, Debian
Squeeze) I discovered a possible Bug in XendConfig.py. More precisely in
the method to_sxp of the class XendConfig. It exposes an optional
parameter "domain=None". But further checks regarding the presence of
this parameter check against member-functions such as domain.getDomid()
or domain._stateGet() which raise an Exception if the parameter is
'None'. The docstring states that this parameter is optional, but
further handling of it either suggest it is not, or the checks are
mistakenly made against methods of 'domain' instead of domain itself.

The offending lines of code in XendConfig.py are:

1095: check against domain.getDomid()

1135: Usage of domain._stateGet()

1137: check against domain.getDomid()

In line 1140 the check is correctly made against 'domain' itself and the 
corresponding if-block only executes if domain was set.

Is this patched in newer versions, can I just add the correct checks or 
will this break something somewhere else?

Regards,
Alx.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Possible bug in XendConfig.py
  2011-06-17 11:04 Possible bug in XendConfig.py Alexander Fittkau
@ 2011-06-20 14:31 ` Ian Jackson
  0 siblings, 0 replies; 2+ messages in thread
From: Ian Jackson @ 2011-06-20 14:31 UTC (permalink / raw)
  To: Alexander Fittkau; +Cc: xen-devel

Alexander Fittkau writes ("[Xen-devel] Possible bug in XendConfig.py"):
> While poking around in various Xend*.py sources (Xen 4.0.1, Debian
> Squeeze) I discovered a possible Bug in XendConfig.py. More precisely in
> the method to_sxp of the class XendConfig. It exposes an optional
> parameter "domain=None". But further checks regarding the presence of
> this parameter check against member-functions such as domain.getDomid()
> or domain._stateGet() which raise an Exception if the parameter is
> 'None'. The docstring states that this parameter is optional, but
> further handling of it either suggest it is not, or the checks are
> mistakenly made against methods of 'domain' instead of domain itself.

I don't think anyone here is really capable of answering these
questions.  Are you asking because xend is malfunctioning for you (eg,
producing stack traces) ?  Or just because you happened to see this
apparent anomaly in the code ?

If the latter, then I'm afraid we're not likely to fix it.  xend is on
the way out; certainly, it is deprecated in xen-unstable.

> Is this patched in newer versions, can I just add the correct checks or 
> will this break something somewhere else?

If you have a change which makes things work for you, which break
without your patch, we're certainly interested in that.

Ian.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-20 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-17 11:04 Possible bug in XendConfig.py Alexander Fittkau
2011-06-20 14:31 ` Ian Jackson

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.