[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/9] golang/xenlight: Don't try to marshall zero-length arrays
> The current fromC array code will do the "magic" casting and > martialling even when num_foo variable is 0. Go crashes when doing > the cast. > > Furthermore, the current toC array code will convert a nil slice into > a zero-length malloc. The resulting pointer is non-NULL, and confuses > libxl. > > Only do array marshalling if the number of elements is non-zero; > otherwise, leave the target pointer empty (nil for Go slices, NULL for > C arrays). > > The toC half of this should be folded into "golang/xenlight: > implement array Go to C marshaling". Looks good to me. I will make the toC change when I send v5 of my series. -NR _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |