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

Re: [Xen-devel] [PATCH v4 01/14] golang/xenlight: Create stub package



On Mon, Mar 20, 2017 at 02:45:30PM +0000, George Dunlap wrote:
> On Thu, Mar 16, 2017 at 7:08 PM, Ronald Rojas <ronladred@xxxxxxxxx> wrote:
> > Create a basic Makefile to build and install libxenlight Golang
> > bindings. Also add a stub package which only opens libxl context.
> >
> > Include a global xenlight.Ctx variable which can be used as the
> > default context by the entire program if desired.
> >
> > For now, return simple errors. Proper error handling will be
> > added in next patch.
> >
> > Signed-off-by: Ronald Rojas <ronladred@xxxxxxxxx>
> > Signed-off-by: George Dunlap <george.dunlap@xxxxxxxxxx>
> 
> Almost there.  One comment on one of the last changes...
> 
 
 [snip]

> I think we want xenlight.Ctx to contain all the information needed to
> open and close it; as long as we're creating a logger automatically,
> we should store the pointer to the logger in the Ctx struct.
> 
> We should also set the pointer to nil after calling
> xtl_logger_destroy() to prevent use-after-free bugs.
> 
> (Yay lack of garbage collection again.)

Makes sense. I'll put the logger inside the Ctx struct.

Ronald

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

 


Rackspace

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