opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: 19636bae17c5cb266d85ea8f2e6dfbbd560923cc
Parent: 0b266eccd6710f8a36516d60b2f5f8c322f2b1fb
Author: Michael Forney
Date:   Thu, 21 Mar 2024 22:35:37 -0700

strace: Update to 6.8

Diffstat:
Mpkg/devel/strace/.gitignore | 2+-
Mpkg/devel/strace/gen.lua | 12+++++++++---
Mpkg/devel/strace/patch/0001-Don-t-return-expression-in-void-function.patch | 8++++----
Apkg/devel/strace/patch/0002-Make-tcp_sysent-a-static-inline-function.patch | 33+++++++++++++++++++++++++++++++++
Dpkg/devel/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch | 355-------------------------------------------------------------------------------
Apkg/devel/strace/patch/0003-Avoid-pointer-arithmetic-on-void.patch | 152+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpkg/devel/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch | 33---------------------------------
Dpkg/devel/strace/patch/0004-Avoid-empty-initializer-lists.patch | 229-------------------------------------------------------------------------------
Rpkg/devel/strace/patch/0006-Avoid-empty-struct-definition.patch -> pkg/devel/strace/patch/0004-Avoid-empty-struct-definition.patch | 0
Dpkg/devel/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch | 152-------------------------------------------------------------------------------
Apkg/devel/strace/patch/0005-Don-t-omit-second-operand-to-operator.patch | 148+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/devel/strace/patch/0006-Avoid-unnecessary-VLAs.patch | 100+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Rpkg/devel/strace/patch/0009-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch -> pkg/devel/strace/patch/0007-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch | 0
Dpkg/devel/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch | 100-------------------------------------------------------------------------------
Dpkg/devel/strace/patch/0008-Avoid-unnecessary-VLAs.patch | 100-------------------------------------------------------------------------------
Rpkg/devel/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch -> pkg/devel/strace/patch/0008-Use-alloca-when-VLAs-aren-t-available.patch | 0
Apkg/devel/strace/patch/0009-Avoid-index-ranges.patch | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Dpkg/devel/strace/patch/0011-Avoid-index-ranges.patch | 62--------------------------------------------------------------
Mpkg/devel/strace/sha256 | 2+-
Mpkg/devel/strace/url | 2+-
Mpkg/devel/strace/ver | 2+-
21 files changed, 512 insertions(+), 1042 deletions(-)

diff --git a/pkg/devel/strace/.gitignore b/pkg/devel/strace/.gitignore @@ -1,3 +1,3 @@ /src -/strace-6.4.tar.xz +/strace-6.8.tar.xz /tools.ninja diff --git a/pkg/devel/strace/gen.lua b/pkg/devel/strace/gen.lua @@ -97,6 +97,7 @@ local srcs = paths[[src/( bpf_sock_filter.c btrfs.c cacheflush.c + cachestat.c capability.c chdir.c chmod.c @@ -119,6 +120,7 @@ local srcs = paths[[src/( evdev_mpers.c eventfd.c execve.c + exitkill.c fadvise.c fallocate.c fanotify.c @@ -149,7 +151,7 @@ local srcs = paths[[src/( fstatfs.c fstatfs64.c futex.c - futex_waitv.c + futex2.c gen/gen_hdio.c get_personality.c get_robust_list.c @@ -186,9 +188,12 @@ local srcs = paths[[src/( link.c lirc_ioctl.c listen.c + listmount.c lookup_dcookie.c loop.c lseek.c + lsm.c + map_shadow_stack.c mem.c membarrier.c memfd_create.c @@ -316,6 +321,7 @@ local srcs = paths[[src/( stat64.c statfs.c statfs64.c + statmount.c statx.c strauss.c string_to_uint.c @@ -381,8 +387,8 @@ file('bin/strace', '755', '$outdir/strace') build('sed', '$outdir/strace.1', '$srcdir/doc/strace.1.in', { expr={ - [[-e 's,@STRACE_MANPAGE_DATE@,2023-06-11,']], - [[-e 's,@VERSION@,6.4,']], + [[-e 's,@STRACE_MANPAGE_DATE@,2024-03-13,']], + [[-e 's,@VERSION@,6.8,']], [[-e 's,@ENABLE_STACKTRACE_TRUE@,#,']], [[-e 's,@ENABLE_STACKTRACE_FALSE@,,']], [[-e 's,@ENABLE_SECONTEXT_TRUE@,#,']], diff --git a/pkg/devel/strace/patch/0001-Don-t-return-expression-in-void-function.patch b/pkg/devel/strace/patch/0001-Don-t-return-expression-in-void-function.patch @@ -1,4 +1,4 @@ -From 14b52959359f69bc5806bbd8d8c44f72d912aa1a Mon Sep 17 00:00:00 2001 +From 79aac49a3d3953b6e62b477bd488c3b7237a5aee Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Fri, 5 Jul 2019 20:52:24 -0700 Subject: [PATCH] Don't return expression in void function @@ -8,10 +8,10 @@ Subject: [PATCH] Don't return expression in void function 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/defs.h b/src/defs.h -index 846a7ae5a..d6b54a633 100644 +index 89ec13fc5..465d58139 100644 --- a/src/defs.h +++ b/src/defs.h -@@ -807,7 +807,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *, +@@ -824,7 +824,7 @@ extern bool pathtrace_match_set(struct tcb *, struct path_set *, static inline void pathtrace_select(const char *path) { @@ -21,5 +21,5 @@ index 846a7ae5a..d6b54a633 100644 static inline bool -- -2.37.3 +2.44.0 diff --git a/pkg/devel/strace/patch/0002-Make-tcp_sysent-a-static-inline-function.patch b/pkg/devel/strace/patch/0002-Make-tcp_sysent-a-static-inline-function.patch @@ -0,0 +1,33 @@ +From 75a23af067ff5390a47df1e877f68834241009b9 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 6 Jul 2019 01:40:36 -0700 +Subject: [PATCH] Make tcp_sysent a static inline function + +This way we can include the second operand to the conditional +operator without evaluating the macro argument multiple times. +--- + src/defs.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/src/defs.h b/src/defs.h +index ae1d1d1dc..bbd8f6748 100644 +--- a/src/defs.h ++++ b/src/defs.h +@@ -402,8 +402,12 @@ struct tcb { + # define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL) + # define has_seccomp_filter(tcp) ((tcp)->flags & TCB_SECCOMP_FILTER) + +-extern const struct_sysent stub_sysent; +-# define tcp_sysent(tcp) (tcp->s_ent ?: &stub_sysent) ++static inline const struct_sysent * ++tcp_sysent(struct tcb *tcp) ++{ ++ extern const struct_sysent stub_sysent; ++ return tcp->s_ent ? tcp->s_ent : &stub_sysent; ++} + # define n_args(tcp) (tcp_sysent(tcp)->nargs) + + # include "xlat.h" +-- +2.44.0 + diff --git a/pkg/devel/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch b/pkg/devel/strace/patch/0002-Use-__typeof__-spelling-of-typeof.patch @@ -1,355 +0,0 @@ -From cdecbf8aee12f837e878a568814bb81550412b6b Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sat, 6 Jul 2019 01:33:01 -0700 -Subject: [PATCH] Use __typeof__ spelling of typeof - ---- - src/bpf.c | 10 +++++----- - src/btrfs.c | 12 ++++++------ - src/defs.h | 6 +++--- - src/fs_0x94_ioctl.c | 2 +- - src/fs_f_ioctl.c | 2 +- - src/landlock.c | 4 ++-- - src/list.h | 10 +++++----- - src/macros.h | 2 +- - src/print_fields.h | 2 +- - src/s390.c | 6 +++--- - src/tee.c | 2 +- - src/ubi.c | 2 +- - tests/btrfs.c | 2 +- - tests/fcntl-common.c | 2 +- - 14 files changed, 32 insertions(+), 32 deletions(-) - -diff --git a/src/bpf.c b/src/bpf.c -index 7bdeb4f65..1e72f3e30 100644 ---- a/src/bpf.c -+++ b/src/bpf.c -@@ -1432,7 +1432,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE) - tprint_struct_next(); - PRINT_FIELD_U(attr, target_btf_id); - } -- attr_size = offsetofend(typeof(attr), target_btf_id); -+ attr_size = offsetofend(__typeof__(attr), target_btf_id); - break; - - /* TODO: prog type == BPF_PROG_TYPE_TRACING */ -@@ -1448,7 +1448,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE) - print_iter_info_array_member, 0); - tprint_struct_next(); - PRINT_FIELD_U(attr, iter_info_len); -- attr_size = offsetofend(typeof(attr), iter_info_len); -+ attr_size = offsetofend(__typeof__(attr), iter_info_len); - break; - } - -@@ -1460,7 +1460,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE) - tprint_struct_begin(); - PRINT_FIELD_X(attr.perf_event, bpf_cookie); - tprint_struct_end(); -- attr_size = offsetofend(typeof(attr), perf_event.bpf_cookie); -+ attr_size = offsetofend(__typeof__(attr), perf_event.bpf_cookie); - break; - - /* TODO: prog type == BPF_PROG_TYPE_KPROBE */ -@@ -1500,7 +1500,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE) - &buf.cookie, sizeof(buf.cookie), - tfetch_mem, print_xint_array_member, 0); - tprint_struct_end(); -- attr_size = offsetofend(typeof(attr), kprobe_multi.cookies); -+ attr_size = offsetofend(__typeof__(attr), kprobe_multi.cookies); - break; - } - -@@ -1510,7 +1510,7 @@ BEGIN_BPF_CMD_DECODER(BPF_LINK_CREATE) - * can pick up non-zero values in the union at the end - * of the link_create struct. - */ -- attr_size = offsetofend(typeof(attr), flags); -+ attr_size = offsetofend(__typeof__(attr), flags); - } - - print_bpf_link_create_end: -diff --git a/src/btrfs.c b/src/btrfs.c -index 31ee871b3..76d7a2bec 100644 ---- a/src/btrfs.c -+++ b/src/btrfs.c -@@ -216,7 +216,7 @@ btrfs_print_logical_ino_container(struct tcb *tcp, - tprint_more_data_follows(); - } else { - const uint64_t val_addr = -- inodes_addr + offsetof(typeof(container), val); -+ inodes_addr + offsetof(__typeof__(container), val); - uint64_t record[3]; - tprint_struct_next(); - tprints_field_name("val"); -@@ -257,7 +257,7 @@ btrfs_print_ino_path_container(struct tcb *tcp, - tprint_more_data_follows(); - } else { - uint64_t val_addr = -- fspath_addr + offsetof(typeof(container), val); -+ fspath_addr + offsetof(__typeof__(container), val); - uint64_t offset; - tprint_struct_next(); - tprints_field_name("val"); -@@ -298,7 +298,7 @@ btrfs_print_qgroup_inherit(struct tcb *const tcp, const kernel_ulong_t qgi_addr) - uint64_t record; - tprint_struct_next(); - tprints_field_name("qgroups"); -- print_array(tcp, qgi_addr + offsetof(typeof(inherit), qgroups), -+ print_array(tcp, qgi_addr + offsetof(__typeof__(inherit), qgroups), - inherit.num_qgroups, &record, sizeof(record), - tfetch_mem, print_uint_array_member, 0); - } -@@ -1170,7 +1170,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, - PRINT_FIELD_OBJ_PTR(args, key, - print_btrfs_ioctl_search_key, - entering(tcp), !abbrev(tcp)); -- decode_search_arg_buf(tcp, arg + offsetof(typeof(args), buf), -+ decode_search_arg_buf(tcp, arg + offsetof(__typeof__(args), buf), - sizeof(args.buf), args.key.nr_items); - tprint_struct_end(); - if (entering(tcp)) -@@ -1206,7 +1206,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, - entering(tcp), !abbrev(tcp)); - tprint_struct_next(); - PRINT_FIELD_U(args, buf_size); -- decode_search_arg_buf(tcp, arg + offsetof(typeof(args), buf), -+ decode_search_arg_buf(tcp, arg + offsetof(__typeof__(args), buf), - args.buf_size, args.key.nr_items); - tprint_struct_end(); - if (entering(tcp)) -@@ -1284,7 +1284,7 @@ MPERS_PRINTER_DECL(int, btrfs_ioctl, - struct btrfs_ioctl_space_info info; - tprint_struct_next(); - tprints_field_name("spaces"); -- print_array(tcp, arg + offsetof(typeof(args), spaces), -+ print_array(tcp, arg + offsetof(__typeof__(args), spaces), - args.total_spaces, - &info, sizeof(info), tfetch_mem, - print_btrfs_ioctl_space_info, 0); -diff --git a/src/defs.h b/src/defs.h -index d6b54a633..d24b11884 100644 ---- a/src/defs.h -+++ b/src/defs.h -@@ -1145,7 +1145,7 @@ print_local_array_ex(struct tcb *tcp, - # define print_local_array_upto(tcp_, start_addr_, upto_, print_func_) \ - print_local_array_ex((tcp_), (start_addr_), \ - CLAMP((upto_), 0, \ -- (typeof(upto_)) ARRAY_SIZE(start_addr_)), \ -+ (__typeof__(upto_)) ARRAY_SIZE(start_addr_)), \ - sizeof((start_addr_)[0]), (print_func_), \ - NULL, 0, NULL, NULL) - -@@ -2027,8 +2027,8 @@ scno_pers_is_valid(kernel_ulong_t scno, unsigned int pers) - - # define ILOG2_ITER_(val_, ret_, bit_) \ - do { \ -- typeof(ret_) shift_ = \ -- ((val_) > ((((typeof(val_)) 1) \ -+ __typeof__(ret_) shift_ = \ -+ ((val_) > ((((__typeof__(val_)) 1) \ - << (1 << (bit_))) - 1)) << (bit_); \ - (val_) >>= shift_; \ - (ret_) |= shift_; \ -diff --git a/src/fs_0x94_ioctl.c b/src/fs_0x94_ioctl.c -index 7aa170af0..b908ea1fb 100644 ---- a/src/fs_0x94_ioctl.c -+++ b/src/fs_0x94_ioctl.c -@@ -94,7 +94,7 @@ decode_file_dedupe_range(struct tcb *const tcp, const kernel_ulong_t arg) - if (abbrev(tcp) && range.dest_count > count) - limit = &count; - -- rc = print_array(tcp, arg + offsetof(typeof(range), info), -+ rc = print_array(tcp, arg + offsetof(__typeof__(range), info), - range.dest_count, &info, sizeof(info), - tfetch_mem, - print_file_dedupe_range_info, limit); -diff --git a/src/fs_f_ioctl.c b/src/fs_f_ioctl.c -index 7b51bc9f9..ee9a42754 100644 ---- a/src/fs_f_ioctl.c -+++ b/src/fs_f_ioctl.c -@@ -72,7 +72,7 @@ decode_fiemap(struct tcb *const tcp, const kernel_ulong_t arg) - struct fiemap_extent fe; - tprint_struct_next(); - tprints_field_name("fm_extents"); -- print_array(tcp, arg + offsetof(typeof(args), fm_extents), -+ print_array(tcp, arg + offsetof(__typeof__(args), fm_extents), - args.fm_mapped_extents, &fe, sizeof(fe), - tfetch_mem, print_fiemap_extent, 0); - } -diff --git a/src/landlock.c b/src/landlock.c -index d3ddb4edb..151bea7af 100644 ---- a/src/landlock.c -+++ b/src/landlock.c -@@ -19,7 +19,7 @@ print_landlock_ruleset_attr(struct tcb *tcp, const kernel_ulong_t addr, - { - struct landlock_ruleset_attr attr; - -- if (size < offsetofend(typeof(attr), handled_access_fs)) { -+ if (size < offsetofend(__typeof__(attr), handled_access_fs)) { - printaddr(addr); - return; - } -@@ -31,7 +31,7 @@ print_landlock_ruleset_attr(struct tcb *tcp, const kernel_ulong_t addr, - PRINT_FIELD_FLAGS(attr, handled_access_fs, landlock_ruleset_access_fs, - "LANDLOCK_ACCESS_FS_???"); - -- if (size > offsetofend(typeof(attr), handled_access_fs)) { -+ if (size > offsetofend(__typeof__(attr), handled_access_fs)) { - tprint_arg_next(); - tprint_more_data_follows(); - } -diff --git a/src/list.h b/src/list.h -index 4de4cb3be..f4ec11f0e 100644 ---- a/src/list.h -+++ b/src/list.h -@@ -158,7 +158,7 @@ list_is_empty(const struct list_item *l) - * @param field Name of the field that holds the respective struct list_item. - */ - # define list_next(var, field) \ -- list_elem((var)->field.next, typeof(*(var)), field) -+ list_elem((var)->field.next, __typeof__(*(var)), field) - /** - * Get the previous element in a list. - * -@@ -166,7 +166,7 @@ list_is_empty(const struct list_item *l) - * @param field Name of the field that holds the respective struct list_item. - */ - # define list_prev(var, field) \ -- list_elem((var)->field.prev, typeof(*(var)), field) -+ list_elem((var)->field.prev, __typeof__(*(var)), field) - - /** - * Insert an item into a list. The item is placed as the next list item -@@ -280,7 +280,7 @@ list_replace(struct list_item *old, struct list_item *new) - * inside list items. - */ - # define list_foreach(var_, head_, field_) \ -- for (var_ = list_elem((head_)->next, typeof(*var_), field_); \ -+ for (var_ = list_elem((head_)->next, __typeof__(*var_), field_); \ - &(var_->field_) != (head_); var_ = list_next(var_, field_)) - - /** -@@ -293,8 +293,8 @@ list_replace(struct list_item *old, struct list_item *new) - * @param _tmp Temporary variable for storing pointer to the next item. - */ - # define list_foreach_safe(var_, head_, field_, _tmp) \ -- for (var_ = list_elem((head_)->next, typeof(*var_), field_), \ -- _tmp = list_elem((var_)->field_.next, typeof(*var_), field_); \ -+ for (var_ = list_elem((head_)->next, __typeof__(*var_), field_), \ -+ _tmp = list_elem((var_)->field_.next, __typeof__(*var_), field_); \ - &var_->field_ != head_; var_ = _tmp, _tmp = list_next(_tmp, field_)) - - #endif /* !STRACE_LIST_H */ -diff --git a/src/macros.h b/src/macros.h -index f22be23c5..184f016b0 100644 ---- a/src/macros.h -+++ b/src/macros.h -@@ -62,7 +62,7 @@ - - # define sizeof_field(type_, member_) (sizeof(((type_ *)0)->member_)) - --# define typeof_field(type_, member_) typeof(((type_ *)0)->member_) -+# define typeof_field(type_, member_) __typeof__(((type_ *)0)->member_) - - # ifndef offsetofend - # define offsetofend(type_, member_) \ -diff --git a/src/print_fields.h b/src/print_fields.h -index eca389e7e..b97e86377 100644 ---- a/src/print_fields.h -+++ b/src/print_fields.h -@@ -774,7 +774,7 @@ tprint_sysret_end(void) - # define MAYBE_PRINT_FIELD_LEN(print_prefix_, where_, field_, \ - len_, print_func_, ...) \ - do { \ -- unsigned int start = offsetof(typeof(where_), field_); \ -+ unsigned int start = offsetof(__typeof__(where_), field_); \ - unsigned int end = start + sizeof((where_).field_); \ - if (len_ > start) { \ - print_prefix_; \ -diff --git a/src/s390.c b/src/s390.c -index ca71730c4..455144fe7 100644 ---- a/src/s390.c -+++ b/src/s390.c -@@ -505,7 +505,7 @@ static void - print_sthyi_machine(struct tcb *tcp, struct sthyi_machine *hdr, uint16_t size, - bool *dummy) - { -- size_t last_decoded = offsetofend(typeof(*hdr), infmpman); -+ size_t last_decoded = offsetofend(__typeof__(*hdr), infmpman); - int cnt_val, name_val, id_val; - - CHECK_SIZE_EX(hdr, last_decoded, size, "machine structure"); -@@ -611,7 +611,7 @@ static void - print_sthyi_partition(struct tcb *tcp, struct sthyi_partition *hdr, - uint16_t size, bool *mt) - { -- size_t last_decoded = offsetofend(typeof(*hdr), infpabif); -+ size_t last_decoded = offsetofend(__typeof__(*hdr), infpabif); - int cnt_val, wcap_val, acap_val, id_val, lpar_val; - - *mt = false; -@@ -802,7 +802,7 @@ static void - print_sthyi_hypervisor(struct tcb *tcp, struct sthyi_hypervisor *hdr, - uint16_t size, int num, bool mt) - { -- size_t last_decoded = offsetofend(typeof(*hdr), infydifl); -+ size_t last_decoded = offsetofend(__typeof__(*hdr), infydifl); - - CHECK_SIZE_EX(hdr, last_decoded, size, "hypervisor %d structure", num); - -diff --git a/src/tee.c b/src/tee.c -index 25f6e76c5..c62566800 100644 ---- a/src/tee.c -+++ b/src/tee.c -@@ -33,7 +33,7 @@ struct tee_ioctl_shm_register_fd_data { - - #define TEE_FETCH_BUF_DATA(buf_, arg_, params_) \ - tee_fetch_buf_data(tcp, arg, &buf_, sizeof(arg_), \ -- &arg_, offsetof(typeof(arg_), num_params), \ -+ &arg_, offsetof(__typeof__(arg_), num_params), \ - params_) - - /* session id is printed as 0x%x in libteec */ -diff --git a/src/ubi.c b/src/ubi.c -index bd2d2811e..ff9f88cd0 100644 ---- a/src/ubi.c -+++ b/src/ubi.c -@@ -76,7 +76,7 @@ static bool - print_ubi_rnvol_req_ent_array_member(struct tcb *tcp, void *elem_buf, - size_t elem_size, void *data) - { -- typeof(&((struct ubi_rnvol_req *) NULL)->ents[0]) p = elem_buf; -+ __typeof__(&((struct ubi_rnvol_req *) NULL)->ents[0]) p = elem_buf; - - tprint_struct_begin(); - PRINT_FIELD_D(*p, vol_id); -diff --git a/tests/btrfs.c b/tests/btrfs.c -index d8ef87a96..321d3a25c 100644 ---- a/tests/btrfs.c -+++ b/tests/btrfs.c -@@ -876,7 +876,7 @@ btrfs_print_tree_search_buf(struct btrfs_ioctl_search_key *key, - printf("buf=["); - for (uint64_t i = 0; i < key->nr_items; ++i) { - struct btrfs_ioctl_search_header *sh; -- sh = (typeof(sh))(buf + off); -+ sh = (__typeof__(sh))(buf + off); - if (i) - printf(", "); - printf("{transid=%" PRI__u64 ", objectid=", -diff --git a/tests/fcntl-common.c b/tests/fcntl-common.c -index 20f92dd1d..aa6ecc8f5 100644 ---- a/tests/fcntl-common.c -+++ b/tests/fcntl-common.c -@@ -28,7 +28,7 @@ - #endif - - #ifdef HAVE_TYPEOF --# define TYPEOF_FLOCK_OFF_T typeof(((struct flock *) NULL)->l_len) -+# define TYPEOF_FLOCK_OFF_T __typeof__(((struct flock *) NULL)->l_len) - #else - # define TYPEOF_FLOCK_OFF_T off_t - #endif --- -2.37.3 - diff --git a/pkg/devel/strace/patch/0003-Avoid-pointer-arithmetic-on-void.patch b/pkg/devel/strace/patch/0003-Avoid-pointer-arithmetic-on-void.patch @@ -0,0 +1,152 @@ +From c154f9dfaaccabc52af12ccabc86e9d0c6c18ada Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 7 Jul 2019 21:25:13 -0700 +Subject: [PATCH] Avoid pointer arithmetic on `void *` + +--- + src/netlink_smc_diag.c | 4 ++-- + src/print_timespec.h | 6 ++++-- + src/sockaddr.c | 4 ++-- + src/tee.c | 2 +- + src/ucopy.c | 12 ++++++------ + 5 files changed, 15 insertions(+), 13 deletions(-) + +diff --git a/src/netlink_smc_diag.c b/src/netlink_smc_diag.c +index 74e78b966..c3a28a839 100644 +--- a/src/netlink_smc_diag.c ++++ b/src/netlink_smc_diag.c +@@ -42,7 +42,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_req) + if (len >= sizeof(req)) { + if (!umoven_or_printaddr(tcp, addr + offset, + sizeof(req) - offset, +- (void *) &req + offset)) { ++ (char *) &req + offset)) { + PRINT_FIELD_FLAGS(req, diag_ext, + smc_diag_extended_flags, + "1<<SMC_DIAG_\?\?\?-1"); +@@ -261,7 +261,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_msg) + if (len >= sizeof(msg)) { + if (!umoven_or_printaddr(tcp, addr + offset, + sizeof(msg) - offset, +- (void *) &msg + offset)) { ++ (char *) &msg + offset)) { + PRINT_FIELD_XVAL(msg, diag_state, + smc_states, "SMC_???"); + tprint_struct_next(); +diff --git a/src/print_timespec.h b/src/print_timespec.h +index dc5f9d10c..87f7ff973 100644 +--- a/src/print_timespec.h ++++ b/src/print_timespec.h +@@ -66,6 +66,8 @@ bool + PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb, + const size_t size) + { ++ const char *ts = arg; ++ + if (nmemb > size / sizeof(TIMESPEC_T)) { + tprint_unavailable(); + return false; +@@ -73,10 +75,10 @@ PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb, + + tprint_array_begin(); + +- for (unsigned int i = 0; i < nmemb; i++, arg += sizeof(TIMESPEC_T)) { ++ for (unsigned int i = 0; i < nmemb; i++, ts += sizeof(TIMESPEC_T)) { + if (i) + tprint_array_next(); +- print_unaligned_timespec_t(arg); ++ print_unaligned_timespec_t(ts); + } + + tprint_array_end(); +diff --git a/src/sockaddr.c b/src/sockaddr.c +index ee1ce8828..c1f9b1740 100644 +--- a/src/sockaddr.c ++++ b/src/sockaddr.c +@@ -583,7 +583,7 @@ print_sockaddr_data_ll(struct tcb *tcp, const void *const buf, + static void + print_sockaddr_data_raw(const void *const buf, const int addrlen) + { +- const char *const data = buf + SIZEOF_SA_FAMILY; ++ const char *const data = (const char *)buf + SIZEOF_SA_FAMILY; + const int datalen = addrlen - SIZEOF_SA_FAMILY; + + tprints_field_name("sa_data"); +@@ -780,7 +780,7 @@ print_sockaddr_data_rxrpc(struct tcb *tcp, const void *const buf, + tprints_field_name("transport"); + tprint_struct_begin(); + +- const void *const transport_buf = (void *) &sa->transport ++ const void *const transport_buf = (char *) &sa->transport + + sizeof(sa->transport.family); + const int transport_len = MIN(sa->transport_len, + len - offsetof(struct sockaddr_rxrpc, +diff --git a/src/tee.c b/src/tee.c +index c62566800..1596a5095 100644 +--- a/src/tee.c ++++ b/src/tee.c +@@ -69,7 +69,7 @@ tee_fetch_buf_data(struct tcb *const tcp, + tee_print_buf(buf); + return RVAL_IOCTL_DECODED; + } +- uint32_t *num_params = (uint32_t *) (arg_struct + num_params_offs); ++ uint32_t *num_params = (uint32_t *) ((char *)arg_struct + num_params_offs); + if (entering(tcp) && + (arg_size + TEE_IOCTL_PARAM_SIZE(*num_params) != buf->buf_len)) { + /* +diff --git a/src/ucopy.c b/src/ucopy.c +index b4e746b0b..007b5373e 100644 +--- a/src/ucopy.c ++++ b/src/ucopy.c +@@ -186,7 +186,7 @@ vm_read_mem(const pid_t pid, void *laddr, + break; + + len = next_len; +- laddr += copy_len; ++ laddr = (char *)laddr + copy_len; + page_start += page_size; + taddr = page_start; + } +@@ -282,7 +282,7 @@ umoven_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, + memcpy(laddr, &u.data[residue], m); + residue = 0; + addr += sizeof(long); +- laddr += m; ++ laddr = (char *)laddr + m; + nread += m; + len -= m; + } +@@ -378,10 +378,10 @@ umovestr_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, + memcpy(laddr, &u.data[residue], m); + while (residue < sizeof(long)) + if (u.data[residue++] == '\0') +- return (laddr - orig_addr) + residue; ++ return nread + residue; + residue = 0; + addr += sizeof(long); +- laddr += m; ++ laddr = (char *)laddr + m; + nread += m; + len -= m; + } +@@ -502,7 +502,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, + + addr += sizeof(long); + nwritten += npoke; +- our_addr += npoke; ++ our_addr = (char *)our_addr + npoke; + len -= npoke; + } + +@@ -515,7 +515,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, + + addr += sizeof(long); + nwritten += sizeof(long); +- our_addr += sizeof(long); ++ our_addr = (char *)our_addr + sizeof(long); + len -= sizeof(long); + } + +-- +2.44.0 + diff --git a/pkg/devel/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch b/pkg/devel/strace/patch/0003-Make-tcp_sysent-a-static-inline-function.patch @@ -1,33 +0,0 @@ -From 0355d08676cdc94354bd35f8d885984938645fb3 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sat, 6 Jul 2019 01:40:36 -0700 -Subject: [PATCH] Make tcp_sysent a static inline function - -This way we can include the second operand to the conditional -operator without evaluating the macro argument multiple times. ---- - src/defs.h | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/defs.h b/src/defs.h -index d24b11884..60b9e3322 100644 ---- a/src/defs.h -+++ b/src/defs.h -@@ -398,8 +398,12 @@ struct tcb { - # define syscall_tampered_nofail(tcp) ((tcp)->flags & TCB_TAMPERED_NO_FAIL) - # define has_seccomp_filter(tcp) ((tcp)->flags & TCB_SECCOMP_FILTER) - --extern const struct_sysent stub_sysent; --# define tcp_sysent(tcp) (tcp->s_ent ?: &stub_sysent) -+static inline const struct_sysent * -+tcp_sysent(struct tcb *tcp) -+{ -+ extern const struct_sysent stub_sysent; -+ return tcp->s_ent ? tcp->s_ent : &stub_sysent; -+} - # define n_args(tcp) (tcp_sysent(tcp)->nargs) - - # include "xlat.h" --- -2.37.3 - diff --git a/pkg/devel/strace/patch/0004-Avoid-empty-initializer-lists.patch b/pkg/devel/strace/patch/0004-Avoid-empty-initializer-lists.patch @@ -1,229 +0,0 @@ -From 463e94867f84bcb4dc85e18cb4304edea90d8659 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sat, 6 Jul 2019 01:54:05 -0700 -Subject: [PATCH] Avoid empty initializer lists - ---- - src/bpf.c | 4 ++-- - src/futex_waitv.c | 2 +- - src/sched.c | 2 +- - src/signal.c | 2 +- - src/strace.c | 2 +- - tests/btrfs.c | 8 ++++---- - tests/clock_nanosleep.c | 2 +- - tests/nanosleep.c | 2 +- - tests/restart_syscall.c | 2 +- - tests/setrlimit.c | 2 +- - tests/timer_create.c | 2 +- - tests/wait4.c | 2 +- - tests/waitid.c | 2 +- - 13 files changed, 17 insertions(+), 17 deletions(-) - -diff --git a/src/bpf.c b/src/bpf.c -index 1e72f3e30..7a6406687 100644 ---- a/src/bpf.c -+++ b/src/bpf.c -@@ -48,7 +48,7 @@ bpf_cmd_decoder(struct tcb *const tcp, \ - #define BEGIN_BPF_CMD_DECODER(bpf_cmd) \ - static DECL_BPF_CMD_DECODER(decode_ ## bpf_cmd) \ - { \ -- struct bpf_cmd ## _struct attr = {}; \ -+ struct bpf_cmd ## _struct attr = {0}; \ - size_t attr_size = bpf_cmd ## _struct_size; \ - const unsigned int len = MIN(size, attr_size); \ - memcpy(&attr, data, len); \ -@@ -159,7 +159,7 @@ print_ebpf_prog(struct tcb *const tcp, const uint64_t addr, const uint32_t len) - if (abbrev(tcp)) { - printaddr(addr); - } else { -- struct ebpf_insns_data eid = {}; -+ struct ebpf_insns_data eid = {0}; - struct ebpf_insn insn; - - print_array(tcp, addr, len, &insn, sizeof(insn), -diff --git a/src/futex_waitv.c b/src/futex_waitv.c -index 512ee715d..340201aa3 100644 ---- a/src/futex_waitv.c -+++ b/src/futex_waitv.c -@@ -49,7 +49,7 @@ print_waiter_array(struct tcb * const tcp, const kernel_ulong_t waiters, - const unsigned int nr_futexes) - { - struct futex_waitv buf; -- struct print_waiter_data data = {}; -+ struct print_waiter_data data = {0}; - - print_array(tcp, waiters, nr_futexes, &buf, sizeof(buf), - tfetch_mem, print_waiter, &data); -diff --git a/src/sched.c b/src/sched.c -index 010366871..2dda5b872 100644 ---- a/src/sched.c -+++ b/src/sched.c -@@ -111,7 +111,7 @@ static void - print_sched_attr(struct tcb *const tcp, const kernel_ulong_t addr, - unsigned int usize) - { -- struct sched_attr attr = {}; -+ struct sched_attr attr = {0}; - unsigned int size; - bool is_set = false; - -diff --git a/src/signal.c b/src/signal.c -index 98f84d500..8680b10fb 100644 ---- a/src/signal.c -+++ b/src/signal.c -@@ -257,7 +257,7 @@ print_sigset_addr_len_limit(struct tcb *const tcp, const kernel_ulong_t addr, - printaddr(addr); - return; - } -- int mask[NSIG_BYTES / sizeof(int)] = {}; -+ int mask[NSIG_BYTES / sizeof(int)] = {0}; - if (umoven_or_printaddr(tcp, addr, len, mask)) - return; - tprints_string(sprintsigmask_n("", mask, len)); -diff --git a/src/strace.c b/src/strace.c -index 5752177b7..9cd4ff461 100644 ---- a/src/strace.c -+++ b/src/strace.c -@@ -3693,7 +3693,7 @@ trace_syscall(struct tcb *tcp, unsigned int *sig) - syscall_entering_finish(tcp, res); - return res; - } else { -- struct timespec ts = {}; -+ struct timespec ts = {0}; - int res = syscall_exiting_decode(tcp, &ts); - if (res != 0) { - res = syscall_exiting_trace(tcp, &ts, res); -diff --git a/tests/btrfs.c b/tests/btrfs.c -index 321d3a25c..442377130 100644 ---- a/tests/btrfs.c -+++ b/tests/btrfs.c -@@ -313,7 +313,7 @@ btrfs_test_subvol_ioctls(void) - char *long_subvol_name; - void *bad_pointer = (void *) (unsigned long) 0xdeadbeeffffffeedULL; - uint64_t u64val = 0xdeadbeefbadc0dedULL; -- struct btrfs_ioctl_vol_args vol_args = {}; -+ struct btrfs_ioctl_vol_args vol_args = {0}; - struct btrfs_ioctl_vol_args_v2 vol_args_v2 = { - .fd = 2, - .flags = max_flags_plus_one(2), -@@ -554,7 +554,7 @@ btrfs_test_balance_ioctls(void) - .devid = 1, - }, - }; -- struct btrfs_ioctl_vol_args vol_args = {}; -+ struct btrfs_ioctl_vol_args vol_args = {0}; - - ioctl(-1, BTRFS_IOC_BALANCE_CTL, 1); - printf("ioctl(-1, %s, %sBTRFS_BALANCE_CTL_PAUSE%s) = -1 EBADF (%m)\n", -@@ -764,7 +764,7 @@ btrfs_print_defrag_range_args(struct btrfs_ioctl_defrag_range_args *args, - static void - btrfs_test_defrag_ioctls(void) - { -- struct btrfs_ioctl_vol_args vol_args = {}; -+ struct btrfs_ioctl_vol_args vol_args = {0}; - struct btrfs_ioctl_defrag_range_args args = { - .start = 0, - .len = -1ULL, -@@ -1092,7 +1092,7 @@ btrfs_test_ino_lookup_ioctl(void) - static void - btrfs_test_space_info_ioctl(void) - { -- struct btrfs_ioctl_space_args args = {}; -+ struct btrfs_ioctl_space_args args = {0}; - - ioctl(-1, BTRFS_IOC_SPACE_INFO, NULL); - printf("ioctl(-1, %s, NULL) = -1 EBADF (%m)\n", -diff --git a/tests/clock_nanosleep.c b/tests/clock_nanosleep.c -index 51bd0d7f7..a1053fd1e 100644 ---- a/tests/clock_nanosleep.c -+++ b/tests/clock_nanosleep.c -@@ -39,7 +39,7 @@ main(void) - .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, - .pad = { 0xdeadbeef, 0xbadc0ded } - }; -- const sigset_t set = {}; -+ const sigset_t set = {0}; - const struct sigaction act = { .sa_handler = handler }; - const struct itimerval itv = { - .it_interval.tv_usec = 222222, -diff --git a/tests/nanosleep.c b/tests/nanosleep.c -index 8ff6a86b8..6377f38ee 100644 ---- a/tests/nanosleep.c -+++ b/tests/nanosleep.c -@@ -53,7 +53,7 @@ main(void) - .ts = { .tv_sec = 0xc0de2, .tv_nsec = 0xc0de3 }, - .pad = { 0xdeadbeef, 0xbadc0ded } - }; -- const sigset_t set = {}; -+ const sigset_t set = {0}; - const struct sigaction act = { .sa_handler = handler }; - const struct itimerval itv = { .it_value.tv_usec = 111111 }; - -diff --git a/tests/restart_syscall.c b/tests/restart_syscall.c -index e4e83dc09..da83d1dc7 100644 ---- a/tests/restart_syscall.c -+++ b/tests/restart_syscall.c -@@ -26,7 +26,7 @@ main(void) - */ - error_msg_and_skip("x32 is broken"); - #else -- const sigset_t set = {}; -+ const sigset_t set = {0}; - const struct sigaction act = { .sa_handler = SIG_IGN }; - const struct itimerval itv = { .it_value.tv_usec = 111111 }; - const struct timespec req = { .tv_nsec = 222222222 }; -diff --git a/tests/setrlimit.c b/tests/setrlimit.c -index d4953f6f8..60d54fbd8 100644 ---- a/tests/setrlimit.c -+++ b/tests/setrlimit.c -@@ -39,7 +39,7 @@ main(void) - printf("setrlimit(%s, NULL) = %s\n", xlat->str, sprintrc(rc)); - # endif - -- struct rlimit libc_rlim = {}; -+ struct rlimit libc_rlim = {0}; - if (getrlimit((int) res, &libc_rlim)) - continue; - rlimit[0] = libc_rlim.rlim_cur; -diff --git a/tests/timer_create.c b/tests/timer_create.c -index af91da0d3..a0a79f1ad 100644 ---- a/tests/timer_create.c -+++ b/tests/timer_create.c -@@ -24,7 +24,7 @@ main(void) - printf("timer_create(CLOCK_REALTIME, NULL, NULL) = -1 %s (%m)\n", - errno2name()); - -- int tid[4] = {}; -+ int tid[4] = {0}; - struct_sigevent sev = { - .sigev_notify = 0xdefaced, - .sigev_signo = 0xfacefeed, -diff --git a/tests/wait4.c b/tests/wait4.c -index faf9423f8..eacee2366 100644 ---- a/tests/wait4.c -+++ b/tests/wait4.c -@@ -89,7 +89,7 @@ k_wait4(const unsigned int pid, void const *wstatus, - static pid_t - do_wait4(pid_t pid, int *wstatus, int options, kernel_rusage_t *ru) - { -- sigset_t mask = {}; -+ sigset_t mask = {0}; - sigaddset(&mask, SIGCHLD); - - assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); -diff --git a/tests/waitid.c b/tests/waitid.c -index 1ed763840..fef941874 100644 ---- a/tests/waitid.c -+++ b/tests/waitid.c -@@ -146,7 +146,7 @@ do_waitid(const unsigned int idtype, - const unsigned int options, - const kernel_rusage_t *const rusage) - { -- sigset_t mask = {}; -+ sigset_t mask = {0}; - sigaddset(&mask, SIGCHLD); - - assert(sigprocmask(SIG_BLOCK, &mask, NULL) == 0); --- -2.37.3 - diff --git a/pkg/devel/strace/patch/0006-Avoid-empty-struct-definition.patch b/pkg/devel/strace/patch/0004-Avoid-empty-struct-definition.patch diff --git a/pkg/devel/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch b/pkg/devel/strace/patch/0005-Avoid-pointer-arithmetic-on-void.patch @@ -1,152 +0,0 @@ -From 989bfd76544b4f62ade9e35d2476332934d27d86 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 7 Jul 2019 21:25:13 -0700 -Subject: [PATCH] Avoid pointer arithmetic on `void *` - ---- - src/netlink_smc_diag.c | 4 ++-- - src/print_timespec.h | 6 ++++-- - src/sockaddr.c | 4 ++-- - src/tee.c | 2 +- - src/ucopy.c | 12 ++++++------ - 5 files changed, 15 insertions(+), 13 deletions(-) - -diff --git a/src/netlink_smc_diag.c b/src/netlink_smc_diag.c -index f7ff06b6b..dbf5be980 100644 ---- a/src/netlink_smc_diag.c -+++ b/src/netlink_smc_diag.c -@@ -42,7 +42,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_req) - if (len >= sizeof(req)) { - if (!umoven_or_printaddr(tcp, addr + offset, - sizeof(req) - offset, -- (void *) &req + offset)) { -+ (char *) &req + offset)) { - PRINT_FIELD_FLAGS(req, diag_ext, - smc_diag_extended_flags, - "1<<SMC_DIAG_\?\?\?-1"); -@@ -250,7 +250,7 @@ DECL_NETLINK_DIAG_DECODER(decode_smc_diag_msg) - if (len >= sizeof(msg)) { - if (!umoven_or_printaddr(tcp, addr + offset, - sizeof(msg) - offset, -- (void *) &msg + offset)) { -+ (char *) &msg + offset)) { - PRINT_FIELD_XVAL(msg, diag_state, - smc_states, "SMC_???"); - tprint_struct_next(); -diff --git a/src/print_timespec.h b/src/print_timespec.h -index 9603a6bb6..f5f747c42 100644 ---- a/src/print_timespec.h -+++ b/src/print_timespec.h -@@ -66,6 +66,8 @@ bool - PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb, - const size_t size) - { -+ const char *ts = arg; -+ - if (nmemb > size / sizeof(TIMESPEC_T)) { - tprint_unavailable(); - return false; -@@ -73,10 +75,10 @@ PRINT_TIMESPEC_ARRAY_DATA_SIZE(const void *arg, const unsigned int nmemb, - - tprint_array_begin(); - -- for (unsigned int i = 0; i < nmemb; i++, arg += sizeof(TIMESPEC_T)) { -+ for (unsigned int i = 0; i < nmemb; i++, ts += sizeof(TIMESPEC_T)) { - if (i) - tprint_array_next(); -- print_unaligned_timespec_t(arg); -+ print_unaligned_timespec_t(ts); - } - - tprint_array_end(); -diff --git a/src/sockaddr.c b/src/sockaddr.c -index 9139da1cd..7126ad2fc 100644 ---- a/src/sockaddr.c -+++ b/src/sockaddr.c -@@ -583,7 +583,7 @@ print_sockaddr_data_ll(struct tcb *tcp, const void *const buf, - static void - print_sockaddr_data_raw(const void *const buf, const int addrlen) - { -- const char *const data = buf + SIZEOF_SA_FAMILY; -+ const char *const data = (const char *)buf + SIZEOF_SA_FAMILY; - const int datalen = addrlen - SIZEOF_SA_FAMILY; - - tprints_field_name("sa_data"); -@@ -780,7 +780,7 @@ print_sockaddr_data_rxrpc(struct tcb *tcp, const void *const buf, - tprints_field_name("transport"); - tprint_struct_begin(); - -- const void *const transport_buf = (void *) &sa->transport -+ const void *const transport_buf = (char *) &sa->transport - + sizeof(sa->transport.family); - const int transport_len = MIN(sa->transport_len, - len - offsetof(struct sockaddr_rxrpc, -diff --git a/src/tee.c b/src/tee.c -index fc735e0da..f705a7a94 100644 ---- a/src/tee.c -+++ b/src/tee.c -@@ -69,7 +69,7 @@ tee_fetch_buf_data(struct tcb *const tcp, - tee_print_buf(buf); - return RVAL_IOCTL_DECODED; - } -- uint32_t *num_params = (uint32_t *) (arg_struct + num_params_offs); -+ uint32_t *num_params = (uint32_t *) ((char *)arg_struct + num_params_offs); - if (entering(tcp) && - (arg_size + TEE_IOCTL_PARAM_SIZE(*num_params) != buf->buf_len)) { - /* -diff --git a/src/ucopy.c b/src/ucopy.c -index c769a1916..ed401ae74 100644 ---- a/src/ucopy.c -+++ b/src/ucopy.c -@@ -186,7 +186,7 @@ vm_read_mem(const pid_t pid, void *laddr, - break; - - len = next_len; -- laddr += copy_len; -+ laddr = (char *)laddr + copy_len; - page_start += page_size; - taddr = page_start; - } -@@ -282,7 +282,7 @@ umoven_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, - memcpy(laddr, &u.data[residue], m); - residue = 0; - addr += sizeof(long); -- laddr += m; -+ laddr = (char *)laddr + m; - nread += m; - len -= m; - } -@@ -378,10 +378,10 @@ umovestr_peekdata(const int pid, kernel_ulong_t addr, unsigned int len, - memcpy(laddr, &u.data[residue], m); - while (residue < sizeof(long)) - if (u.data[residue++] == '\0') -- return (laddr - orig_addr) + residue; -+ return nread + residue; - residue = 0; - addr += sizeof(long); -- laddr += m; -+ laddr = (char *)laddr + m; - nread += m; - len -= m; - } -@@ -502,7 +502,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, - - addr += sizeof(long); - nwritten += npoke; -- our_addr += npoke; -+ our_addr = (char *)our_addr + npoke; - len -= npoke; - } - -@@ -515,7 +515,7 @@ upoken_pokedata(const int pid, kernel_ulong_t addr, unsigned int len, - - addr += sizeof(long); - nwritten += sizeof(long); -- our_addr += sizeof(long); -+ our_addr = (char *)our_addr + sizeof(long); - len -= sizeof(long); - } - --- -2.37.3 - diff --git a/pkg/devel/strace/patch/0005-Don-t-omit-second-operand-to-operator.patch b/pkg/devel/strace/patch/0005-Don-t-omit-second-operand-to-operator.patch @@ -0,0 +1,148 @@ +From 586b8d1808d18149a872f0ee1dc8903b9f9e8750 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 7 Jul 2019 21:53:16 -0700 +Subject: [PATCH] Don't omit second operand to '?' operator + +--- + src/kd_ioctl.c | 2 +- + src/open.c | 5 +++-- + src/prctl.c | 8 ++++---- + src/strace.c | 8 ++++---- + src/strauss.c | 4 +++- + src/util.c | 2 +- + 6 files changed, 16 insertions(+), 13 deletions(-) + +diff --git a/src/kd_ioctl.c b/src/kd_ioctl.c +index ada23d536..fddbd38fb 100644 +--- a/src/kd_ioctl.c ++++ b/src/kd_ioctl.c +@@ -457,7 +457,7 @@ kd_kbd_str_entry(struct tcb *const tcp, const kernel_ulong_t arg, + + if (print_quoted_string((char *) val.kb_string, + MIN(max_strlen, +- (unsigned int) ret ?: sizeof(val.kb_string)), ++ ret ? (unsigned int) ret : sizeof(val.kb_string)), + QUOTE_OMIT_TRAILING_0)) + tprint_more_data_follows(); + +diff --git a/src/open.c b/src/open.c +index 6356c5831..df59ea999 100644 +--- a/src/open.c ++++ b/src/open.c +@@ -88,8 +88,9 @@ sprint_open_modes64(uint64_t flags) + } + *p = '\0'; + +- return sprintflags_ex(outstr, open_mode_flags, flags, sep, +- XLAT_STYLE_ABBREV) ?: outstr; ++ str = sprintflags_ex(outstr, open_mode_flags, flags, sep, ++ XLAT_STYLE_ABBREV); ++ return str ? str : outstr; + } + + const char * +diff --git a/src/prctl.c b/src/prctl.c +index f6b4dd741..951133a83 100644 +--- a/src/prctl.c ++++ b/src/prctl.c +@@ -92,10 +92,10 @@ sprint_sve_val(kernel_ulong_t arg, bool aux) + if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE) + { + xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */", +- arg, flags_str ?: "", flags_str ? "|" : "", vl); ++ arg, flags_str ? flags_str : "", flags_str ? "|" : "", vl); + } else { + xsprintf(out, "%s%s%#" PRI_klx, +- flags_str ?: "", flags_str ? "|" : "", vl); ++ flags_str ? flags_str : "", flags_str ? "|" : "", vl); + } + + return out; +@@ -128,10 +128,10 @@ sprint_sme_val(kernel_ulong_t arg, bool aux) + if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE) + { + xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */", +- arg, flags_str ?: "", flags_str ? "|" : "", vl); ++ arg, flags_str ? flags_str : "", flags_str ? "|" : "", vl); + } else { + xsprintf(out, "%s%s%#" PRI_klx, +- flags_str ?: "", flags_str ? "|" : "", vl); ++ flags_str ? flags_str : "", flags_str ? "|" : "", vl); + } + + return out; +diff --git a/src/strace.c b/src/strace.c +index 9c87e34ed..13904f6e1 100644 +--- a/src/strace.c ++++ b/src/strace.c +@@ -2609,7 +2609,7 @@ init(int argc, char *argv[]) + break; + case GETOPT_TS: + tflag_long_set = true; +- if (parse_ts_arg(optarg ?: tflag_str)) ++ if (parse_ts_arg(optarg ? optarg : tflag_str)) + error_opt_arg(c, lopt, optarg); + break; + case 'T': +@@ -2683,7 +2683,7 @@ init(int argc, char *argv[]) + error_opt_arg(c, lopt, optarg); + break; + case GETOPT_TIPS: +- if (parse_tips_arg(optarg ?: "")) ++ if (parse_tips_arg(optarg ? optarg : "")) + error_opt_arg(c, lopt, optarg); + break; + case GETOPT_ARGV0: +@@ -2729,10 +2729,10 @@ init(int argc, char *argv[]) + qualify_kvm(optarg); + break; + case GETOPT_QUAL_QUIET: +- qualify_quiet(optarg ?: qflag_qual); ++ qualify_quiet(optarg ? optarg : qflag_qual); + break; + case GETOPT_QUAL_DECODE_FD: +- qualify_decode_fd(optarg ?: yflag_qual); ++ qualify_decode_fd(optarg ? optarg : yflag_qual); + break; + case GETOPT_QUAL_DECODE_PID: + qualify_decode_pid(optarg); +diff --git a/src/strauss.c b/src/strauss.c +index bec85021b..5d49f950a 100644 +--- a/src/strauss.c ++++ b/src/strauss.c +@@ -367,6 +367,7 @@ print_totd(void) + struct timeval tv; + size_t id; + size_t i; ++ const char *tip; + + if (printed || show_tips == TIPS_NONE) + return; +@@ -386,9 +387,10 @@ print_totd(void) + for (i = 0; (i < MAX_TIP_LINES) && (tips_tricks_tweaks[id][i] || + (i < (ARRAY_SIZE(tip_right) - 1))); + i++) { ++ tip = tips_tricks_tweaks[id][i]; + fprintf(stderr, "%s%-*s%s%s\n", + tip_left[MIN(i + 1, ARRAY_SIZE(tip_left) - 1)], +- w, tips_tricks_tweaks[id][i] ?: "", ++ w, tip ? tip : "", + tip_right[MIN(i + 1, ARRAY_SIZE(tip_right) - 1)], + strauss[MIN(3 + i, strauss_lines - 1)]); + } +diff --git a/src/util.c b/src/util.c +index efd390577..5e87559dc 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -640,7 +640,7 @@ printsocket(struct tcb *tcp, int fd, const char *path) + return false; + + const char *details = get_sockaddr_by_inode(tcp, fd, inode); +- print_string_in_angle_brackets(details ?: path); ++ print_string_in_angle_brackets(details ? details : path); + + return true; + } +-- +2.44.0 + diff --git a/pkg/devel/strace/patch/0006-Avoid-unnecessary-VLAs.patch b/pkg/devel/strace/patch/0006-Avoid-unnecessary-VLAs.patch @@ -0,0 +1,100 @@ +From ab57c5ea74c7a1ced31c07bb62c43fc766811e01 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sun, 7 Jul 2019 21:58:46 -0700 +Subject: [PATCH] Avoid unnecessary VLAs + +--- + src/count.c | 2 +- + src/nlattr.c | 2 +- + src/socketutils.c | 4 ++-- + src/syscall.c | 2 +- + src/util.c | 5 ++--- + 5 files changed, 7 insertions(+), 8 deletions(-) + +diff --git a/src/count.c b/src/count.c +index 2494a44d6..704e3a8d5 100644 +--- a/src/count.c ++++ b/src/count.c +@@ -414,7 +414,7 @@ call_summary_pers(FILE *outf) + fprintf(outf, column_fmts[i], (val_), cwidths[c]); \ + break + +- const char *column_fmts[last_column + 1]; ++ const char *column_fmts[ARRAY_SIZE(columns)]; + for (size_t i = 0; i <= last_column; ++i) { + const size_t c = columns[i]; + +diff --git a/src/nlattr.c b/src/nlattr.c +index 1fb394d7c..6f2d54979 100644 +--- a/src/nlattr.c ++++ b/src/nlattr.c +@@ -357,7 +357,7 @@ decode_nla_hwaddr(struct tcb *const tcp, + if (len > MAX_ADDR_LEN) + return false; + +- uint8_t buf[len]; ++ uint8_t buf[MAX_ADDR_LEN]; + const uintptr_t arphrd = (uintptr_t) opaque_data; + + if (!umoven_or_printaddr(tcp, addr, len, buf)) { +diff --git a/src/socketutils.c b/src/socketutils.c +index d3a3b9283..e0079456f 100644 +--- a/src/socketutils.c ++++ b/src/socketutils.c +@@ -133,7 +133,7 @@ inet_parse_response(const void *const data, const int data_len, + return -1; + } + +- char src_buf[text_size]; ++ char src_buf[INET6_ADDRSTRLEN]; + char *details; + + /* open/closing brackets for IPv6 addresses */ +@@ -146,7 +146,7 @@ inet_parse_response(const void *const data, const int data_len, + + if (diag_msg->id.idiag_dport || + memcmp(zero_addr, diag_msg->id.idiag_dst, addr_size)) { +- char dst_buf[text_size]; ++ char dst_buf[INET6_ADDRSTRLEN]; + + if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_dst, + dst_buf, text_size)) +diff --git a/src/syscall.c b/src/syscall.c +index 6d9e843fe..44d5e9e0b 100644 +--- a/src/syscall.c ++++ b/src/syscall.c +@@ -287,7 +287,7 @@ decode_socket_subcall(struct tcb *tcp) + + const kernel_ulong_t scno = SYS_socket_subcall + call; + const unsigned int nargs = sysent[scno].nargs; +- uint64_t buf[nargs]; ++ uint64_t buf[MAX_ARGS]; + + if (umoven(tcp, tcp->u_arg[1], nargs * current_wordsize, buf) < 0) + return; +diff --git a/src/util.c b/src/util.c +index efd390577..c9e0c6212 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -569,8 +569,7 @@ enum sock_proto + getfdproto(struct tcb *tcp, int fd) + { + #ifdef HAVE_SYS_XATTR_H +- size_t bufsize = 256; +- char buf[bufsize]; ++ char buf[256]; + ssize_t r; + char path[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3]; + +@@ -578,7 +577,7 @@ getfdproto(struct tcb *tcp, int fd) + return SOCK_PROTO_UNKNOWN; + + xsprintf(path, "/proc/%u/fd/%u", get_proc_pid(tcp->pid), fd); +- r = getxattr(path, "system.sockprotoname", buf, bufsize - 1); ++ r = getxattr(path, "system.sockprotoname", buf, sizeof(buf) - 1); + if (r <= 0) + return SOCK_PROTO_UNKNOWN; + else { +-- +2.44.0 + diff --git a/pkg/devel/strace/patch/0009-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch b/pkg/devel/strace/patch/0007-Avoid-index-ranges-and-empty-initializer-lists-in-sy.patch diff --git a/pkg/devel/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch b/pkg/devel/strace/patch/0007-Don-t-omit-second-operand-to-operator.patch @@ -1,100 +0,0 @@ -From 3b3898e2a370be0489226da973e18176530e267a Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 7 Jul 2019 21:53:16 -0700 -Subject: [PATCH] Don't omit second operand to '?' operator - ---- - src/kd_ioctl.c | 2 +- - src/open.c | 5 +++-- - src/prctl.c | 8 ++++---- - src/strace.c | 6 +++--- - 4 files changed, 11 insertions(+), 10 deletions(-) - -diff --git a/src/kd_ioctl.c b/src/kd_ioctl.c -index ada23d536..fddbd38fb 100644 ---- a/src/kd_ioctl.c -+++ b/src/kd_ioctl.c -@@ -457,7 +457,7 @@ kd_kbd_str_entry(struct tcb *const tcp, const kernel_ulong_t arg, - - if (print_quoted_string((char *) val.kb_string, - MIN(max_strlen, -- (unsigned int) ret ?: sizeof(val.kb_string)), -+ ret ? (unsigned int) ret : sizeof(val.kb_string)), - QUOTE_OMIT_TRAILING_0)) - tprint_more_data_follows(); - -diff --git a/src/open.c b/src/open.c -index 6356c5831..df59ea999 100644 ---- a/src/open.c -+++ b/src/open.c -@@ -88,8 +88,9 @@ sprint_open_modes64(uint64_t flags) - } - *p = '\0'; - -- return sprintflags_ex(outstr, open_mode_flags, flags, sep, -- XLAT_STYLE_ABBREV) ?: outstr; -+ str = sprintflags_ex(outstr, open_mode_flags, flags, sep, -+ XLAT_STYLE_ABBREV); -+ return str ? str : outstr; - } - - const char * -diff --git a/src/prctl.c b/src/prctl.c -index f6b4dd741..951133a83 100644 ---- a/src/prctl.c -+++ b/src/prctl.c -@@ -92,10 +92,10 @@ sprint_sve_val(kernel_ulong_t arg, bool aux) - if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE) - { - xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */", -- arg, flags_str ?: "", flags_str ? "|" : "", vl); -+ arg, flags_str ? flags_str : "", flags_str ? "|" : "", vl); - } else { - xsprintf(out, "%s%s%#" PRI_klx, -- flags_str ?: "", flags_str ? "|" : "", vl); -+ flags_str ? flags_str : "", flags_str ? "|" : "", vl); - } - - return out; -@@ -128,10 +128,10 @@ sprint_sme_val(kernel_ulong_t arg, bool aux) - if (!aux && flags && xlat_verbose(xlat_verbosity) == XLAT_STYLE_VERBOSE) - { - xsprintf(out, "%#" PRI_klx " /* %s%s%#" PRI_klx " */", -- arg, flags_str ?: "", flags_str ? "|" : "", vl); -+ arg, flags_str ? flags_str : "", flags_str ? "|" : "", vl); - } else { - xsprintf(out, "%s%s%#" PRI_klx, -- flags_str ?: "", flags_str ? "|" : "", vl); -+ flags_str ? flags_str : "", flags_str ? "|" : "", vl); - } - - return out; -diff --git a/src/strace.c b/src/strace.c -index 9cd4ff461..4403bd27e 100644 ---- a/src/strace.c -+++ b/src/strace.c -@@ -2494,7 +2494,7 @@ init(int argc, char *argv[]) - break; - case GETOPT_TS: - tflag_long_set = true; -- if (parse_ts_arg(optarg ?: tflag_str)) -+ if (parse_ts_arg(optarg ? optarg : tflag_str)) - error_opt_arg(c, lopt, optarg); - break; - case 'T': -@@ -2614,10 +2614,10 @@ init(int argc, char *argv[]) - qualify_kvm(optarg); - break; - case GETOPT_QUAL_QUIET: -- qualify_quiet(optarg ?: qflag_qual); -+ qualify_quiet(optarg ? optarg : qflag_qual); - break; - case GETOPT_QUAL_DECODE_FD: -- qualify_decode_fd(optarg ?: yflag_qual); -+ qualify_decode_fd(optarg ? optarg : yflag_qual); - break; - case GETOPT_QUAL_DECODE_PID: - qualify_decode_pid(optarg); --- -2.37.3 - diff --git a/pkg/devel/strace/patch/0008-Avoid-unnecessary-VLAs.patch b/pkg/devel/strace/patch/0008-Avoid-unnecessary-VLAs.patch @@ -1,100 +0,0 @@ -From a98e58cc36d6df5935dbedd9e1c2947262b8b67c Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Sun, 7 Jul 2019 21:58:46 -0700 -Subject: [PATCH] Avoid unnecessary VLAs - ---- - src/count.c | 2 +- - src/nlattr.c | 2 +- - src/socketutils.c | 4 ++-- - src/syscall.c | 2 +- - src/util.c | 5 ++--- - 5 files changed, 7 insertions(+), 8 deletions(-) - -diff --git a/src/count.c b/src/count.c -index e4f362787..ad203748b 100644 ---- a/src/count.c -+++ b/src/count.c -@@ -414,7 +414,7 @@ call_summary_pers(FILE *outf) - fprintf(outf, column_fmts[i], (val_), cwidths[c]); \ - break - -- const char *column_fmts[last_column + 1]; -+ const char *column_fmts[ARRAY_SIZE(columns)]; - for (size_t i = 0; i <= last_column; ++i) { - const size_t c = columns[i]; - -diff --git a/src/nlattr.c b/src/nlattr.c -index 1fb394d7c..6f2d54979 100644 ---- a/src/nlattr.c -+++ b/src/nlattr.c -@@ -357,7 +357,7 @@ decode_nla_hwaddr(struct tcb *const tcp, - if (len > MAX_ADDR_LEN) - return false; - -- uint8_t buf[len]; -+ uint8_t buf[MAX_ADDR_LEN]; - const uintptr_t arphrd = (uintptr_t) opaque_data; - - if (!umoven_or_printaddr(tcp, addr, len, buf)) { -diff --git a/src/socketutils.c b/src/socketutils.c -index d3a3b9283..e0079456f 100644 ---- a/src/socketutils.c -+++ b/src/socketutils.c -@@ -133,7 +133,7 @@ inet_parse_response(const void *const data, const int data_len, - return -1; - } - -- char src_buf[text_size]; -+ char src_buf[INET6_ADDRSTRLEN]; - char *details; - - /* open/closing brackets for IPv6 addresses */ -@@ -146,7 +146,7 @@ inet_parse_response(const void *const data, const int data_len, - - if (diag_msg->id.idiag_dport || - memcmp(zero_addr, diag_msg->id.idiag_dst, addr_size)) { -- char dst_buf[text_size]; -+ char dst_buf[INET6_ADDRSTRLEN]; - - if (!inet_ntop(diag_msg->idiag_family, diag_msg->id.idiag_dst, - dst_buf, text_size)) -diff --git a/src/syscall.c b/src/syscall.c -index c636ba37c..687d08bc0 100644 ---- a/src/syscall.c -+++ b/src/syscall.c -@@ -287,7 +287,7 @@ decode_socket_subcall(struct tcb *tcp) - - const kernel_ulong_t scno = SYS_socket_subcall + call; - const unsigned int nargs = sysent[scno].nargs; -- uint64_t buf[nargs]; -+ uint64_t buf[MAX_ARGS]; - - if (umoven(tcp, tcp->u_arg[1], nargs * current_wordsize, buf) < 0) - return; -diff --git a/src/util.c b/src/util.c -index a63d80678..a3bea5b76 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -556,8 +556,7 @@ enum sock_proto - getfdproto(struct tcb *tcp, int fd) - { - #ifdef HAVE_SYS_XATTR_H -- size_t bufsize = 256; -- char buf[bufsize]; -+ char buf[256]; - ssize_t r; - char path[sizeof("/proc/%u/fd/%u") + 2 * sizeof(int)*3]; - -@@ -565,7 +564,7 @@ getfdproto(struct tcb *tcp, int fd) - return SOCK_PROTO_UNKNOWN; - - xsprintf(path, "/proc/%u/fd/%u", get_proc_pid(tcp->pid), fd); -- r = getxattr(path, "system.sockprotoname", buf, bufsize - 1); -+ r = getxattr(path, "system.sockprotoname", buf, sizeof(buf) - 1); - if (r <= 0) - return SOCK_PROTO_UNKNOWN; - else { --- -2.37.3 - diff --git a/pkg/devel/strace/patch/0010-Use-alloca-when-VLAs-aren-t-available.patch b/pkg/devel/strace/patch/0008-Use-alloca-when-VLAs-aren-t-available.patch diff --git a/pkg/devel/strace/patch/0009-Avoid-index-ranges.patch b/pkg/devel/strace/patch/0009-Avoid-index-ranges.patch @@ -0,0 +1,62 @@ +From b7f05e44f267fde2bc317a54430ec106d5af2808 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Thu, 30 Jan 2020 22:32:50 -0800 +Subject: [PATCH] Avoid index ranges + +The change in print_mac.c is not functionally the same, but we +ignore this for now. +--- + src/print_mac.c | 4 +--- + src/util.c | 8 ++++---- + 2 files changed, 5 insertions(+), 7 deletions(-) + +diff --git a/src/print_mac.c b/src/print_mac.c +index cad1013a8..73d7bbe28 100644 +--- a/src/print_mac.c ++++ b/src/print_mac.c +@@ -17,8 +17,6 @@ + DIAG_PUSH_IGNORE_OVERRIDE_INIT + + static uint8_t hwaddr_sizes[] = { +- [0 ... ARPHRD_VSOCKMON] = 255, +- + [ARPHRD_NETROM] = 7 /* AX25_ADDR_LEN */, + [ARPHRD_ETHER] = 6 /* ETH_ALEN */, + /* ARPHRD_EETHER - no actual devices in Linux */ +@@ -129,7 +127,7 @@ print_mac_addr(const char *prefix, const uint8_t addr[], size_t size) + static const char * + sprint_hwaddr(const uint8_t hwaddr[], size_t size, uint32_t devtype) + { +- uint8_t sz = (devtype < ARRAY_SIZE(hwaddr_sizes)) ++ uint8_t sz = (devtype < ARRAY_SIZE(hwaddr_sizes) && hwaddr_sizes[devtype]) + ? hwaddr_sizes[devtype] : 255; + + return sprint_mac_addr(hwaddr, MIN(size, sz)); +diff --git a/src/util.c b/src/util.c +index c9e0c6212..875c3ae9c 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -1519,16 +1519,16 @@ dumpstr(struct tcb *const tcp, const kernel_ulong_t addr, + ? 1 + ilog2_klong(len - 1) / HEX_BIT : DUMPSTR_OFFS_MIN_CHARS; + kernel_ulong_t i = 0; + const unsigned char *src; ++ char outbuf[DUMPSTR_WIDTH_CHARS + 1]; ++ ++ memset(outbuf, ' ', DUMPSTR_WIDTH_CHARS); ++ outbuf[DUMPSTR_WIDTH_CHARS] = '\0'; + + while (i < len) { + /* + * It is important to overwrite all the byte values, as we + * re-use the buffer in order to avoid its re-initialisation. + */ +- static char outbuf[] = { +- [0 ... DUMPSTR_WIDTH_CHARS - 1] = ' ', +- '\0' +- }; + char *dst = outbuf; + + /* Fetching data from tracee. */ +-- +2.44.0 + diff --git a/pkg/devel/strace/patch/0011-Avoid-index-ranges.patch b/pkg/devel/strace/patch/0011-Avoid-index-ranges.patch @@ -1,62 +0,0 @@ -From d1c93514cb65877134e8f53b189adbcd5a0e1b43 Mon Sep 17 00:00:00 2001 -From: Michael Forney <mforney@mforney.org> -Date: Thu, 30 Jan 2020 22:32:50 -0800 -Subject: [PATCH] Avoid index ranges - -The change in print_mac.c is not functionally the same, but we -ignore this for now. ---- - src/print_mac.c | 4 +--- - src/util.c | 8 ++++---- - 2 files changed, 5 insertions(+), 7 deletions(-) - -diff --git a/src/print_mac.c b/src/print_mac.c -index cad1013a8..73d7bbe28 100644 ---- a/src/print_mac.c -+++ b/src/print_mac.c -@@ -17,8 +17,6 @@ - DIAG_PUSH_IGNORE_OVERRIDE_INIT - - static uint8_t hwaddr_sizes[] = { -- [0 ... ARPHRD_VSOCKMON] = 255, -- - [ARPHRD_NETROM] = 7 /* AX25_ADDR_LEN */, - [ARPHRD_ETHER] = 6 /* ETH_ALEN */, - /* ARPHRD_EETHER - no actual devices in Linux */ -@@ -129,7 +127,7 @@ print_mac_addr(const char *prefix, const uint8_t addr[], size_t size) - static const char * - sprint_hwaddr(const uint8_t hwaddr[], size_t size, uint32_t devtype) - { -- uint8_t sz = (devtype < ARRAY_SIZE(hwaddr_sizes)) -+ uint8_t sz = (devtype < ARRAY_SIZE(hwaddr_sizes) && hwaddr_sizes[devtype]) - ? hwaddr_sizes[devtype] : 255; - - return sprint_mac_addr(hwaddr, MIN(size, sz)); -diff --git a/src/util.c b/src/util.c -index a3bea5b76..21fb9560f 100644 ---- a/src/util.c -+++ b/src/util.c -@@ -1477,16 +1477,16 @@ dumpstr(struct tcb *const tcp, const kernel_ulong_t addr, - ? 1 + ilog2_klong(len - 1) / HEX_BIT : DUMPSTR_OFFS_MIN_CHARS; - kernel_ulong_t i = 0; - const unsigned char *src; -+ char outbuf[DUMPSTR_WIDTH_CHARS + 1]; -+ -+ memset(outbuf, ' ', DUMPSTR_WIDTH_CHARS); -+ outbuf[DUMPSTR_WIDTH_CHARS] = '\0'; - - while (i < len) { - /* - * It is important to overwrite all the byte values, as we - * re-use the buffer in order to avoid its re-initialisation. - */ -- static char outbuf[] = { -- [0 ... DUMPSTR_WIDTH_CHARS - 1] = ' ', -- '\0' -- }; - char *dst = outbuf; - - /* Fetching data from tracee. */ --- -2.37.3 - diff --git a/pkg/devel/strace/sha256 b/pkg/devel/strace/sha256 @@ -1 +1 @@ -27987dbac57fdfd260c6db4dc8328df35c95c6867c8a3d4371d59cdcf4eb9238 strace-6.4.tar.xz +ba6950a96824cdf93a584fa04f0a733896d2a6bc5f0ad9ffe505d9b41e970149 strace-6.8.tar.xz diff --git a/pkg/devel/strace/url b/pkg/devel/strace/url @@ -1 +1 @@ -url = "https://github.com/strace/strace/releases/download/v6.4/strace-6.4.tar.xz" +url = "https://github.com/strace/strace/releases/download/v6.8/strace-6.8.tar.xz" diff --git a/pkg/devel/strace/ver b/pkg/devel/strace/ver @@ -1 +1 @@ -6.4 r0 +6.8 r0