[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/libxc: Initialise parameters in map_p2m_list() for error paths
On 07/01/16 16:06, Ian Campbell wrote: > On Thu, 2016-01-07 at 14:55 +0000, Andrew Cooper wrote: >> c/s 7bf7458 "libxc: support of linear p2m list for migration of >> pv-domains" breaks compilation on CentOS 7 because of 'ptes' being >> possibly uninitialised after the 'err:' label. >> >> The migration will fail early for conditions which would cause the for() >> loop not to run, but the compiler doesn't know this. > > Isn't the issue the malloc goto err path before the loop? Looks like that > should have the error behaviour from the earlier half of the function > rather than the latter. Yes to both. OTOH with Andrew's patch the code behaves correctly. > There might also be a path if ctx->x86_pv.levels == 0, in which case the > loop will never run, that's the sort of thing which could be checked (or > even perhaps asserted) on entry to the function. As there is no function vector involved between setting levels and consuming it I doubt this makes really sense. Juergen _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |