From 986fa4971cf27c597fa4baa23e88ce340187c2d0 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 26 Apr 2020 15:34:25 +0200 Subject: prog: don't squash objects that contain pointers Squashing pointers creates several problems: - we need to generate pointer types on the fly, something we don't do in any other contexts, it complicates other changes - pointers are very special as values, if we change size of the surrounding blobs, offsets changes and we will use something that's not a pointer as pointer and vise versa, boths things are most likley very bad as inputs - squashing/any implementation is just too complex This disqualifies several types for squashing: < alloc_pd_cmd < arpt_replace < array[cmsghdr_rds] < create_cq_cmd < create_flow_cmd < create_qp_cmd < create_srq_cmd < ebt_counters_info < ip6t_replace < ipt_replace < mlx5_alloc_pd_cmd < mlx5_create_dv_qp_cmd < open_xrcd_cmd < post_recv_cmd < post_send_cmd < post_srq_recv_cmd < query_qp_cmd < query_srq_cmd < reg_mr_cmd < rereg_mr_cmd < resize_cq_cmd < usbdevfs_urb < vhost_memory < vusb_connect_descriptors and adds few new: > binder_objects > query_qp_resp > resize_cq_resp > usb_bos_descriptor > usb_string_descriptor Overall this looks sane. Majority is still unchanged. --- sys/test/any.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'sys') diff --git a/sys/test/any.txt b/sys/test/any.txt index cc71f9940..060992c3f 100644 --- a/sys/test/any.txt +++ b/sys/test/any.txt @@ -18,11 +18,9 @@ any0 { } [align[8]] any1 { - f1 ptr[in, int8, opt] - f2 anyunion0 - f3 ptr64[in, int8, opt] - f4 anyunion1 - f5 array[int8] + f1 anyunion0 + f2 anyunion1 + f3 array[int8] } [packed, align[2]] anyunion0 [ -- cgit mrf-deployment