[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Coverity issues with block stubdom support in libxl



On Wed, 2013-11-20 at 13:49 +0000, Andrew Cooper wrote:
> CID 1130516 - NEGATIVE_RETURNS
> xl_cmdimpl.c: do_daemonize().  Coverity complains that it is possible to
> dup2(logfile, 1); with logfile as -1.  It appears that the uses of
> CHK_ERRNO() are bogus.  CHK_ERRNO() itself tests for "(call) < 0".  In
> do_daemonize(), the tests therefore become "if ( ((call) < 0) < 0 )"
> which fails to catch the error condition.  I suspect removing the
> trailing "<0" in the CHK_ERRNO() calls should fix the error (but I would
> appreciate a second opinion on this).

Yes, I think that macro is a bit dodgy -- it's called in two different
contexts and handles neither of them properly AFAICT!

See http://marc.info/?l=xen-devel&m=138018557503300 for previous
discussion.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.