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

Re: [Xen-devel] [PATCH v2] tools: libxl: make it illegal to pass libxl__realloc(gc) a non-gc ptr



On Thu, 2016-02-11 at 11:37 +0000, Wei Liu wrote:
> On Thu, Feb 11, 2016 at 09:23:54AM +0000, Ian Campbell wrote:
> > That is, if gc is not NOGC and ptr is not NULL then ptr must be
> > associated gc.
> > 
> 
> "associated with gc"?
> 
> Anyway, I get the idea.

Yeah, apparently I was having language issues yesterday (v1 had a different
mangling elsewhere)

> > Currently in this case the new_ptr would not be registered with any
> > gc, which Coverity rightly points out (in various different places)
> > would be a memory leak.
> > 
> > It would also be possible to fix this by adding a libxl__ptr_add() at
> > the same point, however semantically it seems like a programming error
> > to gc-realloc a pointer which is not associated with the gc in
> > question, so treat it as such.
> > 
> > Compile tested only, this change could expose latent bugs.
> > 
> > Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> 
> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>

Thanks. I corrected the above to "with a gc" and applied.


_______________________________________________
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®.