[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v1 1/1] libxl/gentypes: add range init to array elements in json parsing
Ian Jackson writes ("Re: [Xen-devel] [PATCH v1 1/1] libxl/gentypes: add range init to array elements in json parsing"): > Julien Grall writes ("Re: [Xen-devel] [PATCH v1 1/1] libxl/gentypes: add > range init to array elements in json parsing"): > > I am also not entirely sure whether we should also cater the > > ty.init_val != None as well here. > > We should. > > I have a revised patch. It makes no difference to the C output, > compared to Oleksandr's patch. I assume we have no arrays of things > with an init_val... I experimentally added this: modified tools/libxl/libxl_types.idl @@ -461,6 +461,7 @@ libxl_vnode_info = Struct("vnode_info", [ ("distances", Array(uint32, "num_distances")), # distances from this node to other nodes ("pnode", uint32), # physical node of this node ("vcpus", libxl_bitmap), # vcpus in this node + ("sporks", Array(MemKB, "num_sporks")), ]) libxl_gic_version = Enumeration("gic_version", [ This generates code containing this, to do json parsing of the sporks array: @@ -12657,6 +12657,7 @@ goto out; } for (i=0; (t=libxl__json_array_get(x,i)); i++) { + p->sporks[i] = LIBXL_MEMKB_DEFAULT; rc = libxl__uint64_parse_json(gc, t, &p->sporks[i]); if (rc) goto out; Here "+" is a line which is missing from the output of Oleksandr's version and present in the output of mine. I think this means I have convinced myself that we correctly identified a latent bug here and that I have fixed it. I will send out a revised version of this series shortly. I think it is a candidate for 4.13. Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |