diff options
7 files changed, 37 insertions, 421 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch deleted file mode 100644 index c896e3ebb0..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ARM-code-has-unreachable-code-after-switch-statement.patch +++ /dev/null | |||
| @@ -1,42 +0,0 @@ | |||
| 1 | From 95ff340a74af16cca89fd5c5ca99890821053209 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sat, 22 Apr 2017 00:47:16 -0700 | ||
| 4 | Subject: [PATCH] ARM code has unreachable code after switch statement move | ||
| 5 | initialization | ||
| 6 | |||
| 7 | Fixed | ||
| 8 | sysdeps/linux-gnu/arm/trace.c:173:33: error: statement will never be executed [-Werror=switch-unreachable] | ||
| 9 | uint32_t operand1, operand2, result = 0; | ||
| 10 | ^~~~~~ | ||
| 11 | |||
| 12 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 13 | --- | ||
| 14 | Upstream-Status: Pending | ||
| 15 | |||
| 16 | sysdeps/linux-gnu/arm/trace.c | 3 ++- | ||
| 17 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 18 | |||
| 19 | diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c | ||
| 20 | index 5e51e91..f974d1f 100644 | ||
| 21 | --- a/sysdeps/linux-gnu/arm/trace.c | ||
| 22 | +++ b/sysdeps/linux-gnu/arm/trace.c | ||
| 23 | @@ -155,6 +155,8 @@ arm_get_next_pcs(struct process *proc, | ||
| 24 | const unsigned cond = BITS(this_instr, 28, 31); | ||
| 25 | const unsigned opcode = BITS(this_instr, 24, 27); | ||
| 26 | |||
| 27 | + uint32_t operand1, operand2, result = 0; | ||
| 28 | + | ||
| 29 | if (cond == COND_NV) | ||
| 30 | switch (opcode) { | ||
| 31 | arch_addr_t addr; | ||
| 32 | @@ -170,7 +172,6 @@ arm_get_next_pcs(struct process *proc, | ||
| 33 | } | ||
| 34 | else | ||
| 35 | switch (opcode) { | ||
| 36 | - uint32_t operand1, operand2, result = 0; | ||
| 37 | case 0x0: | ||
| 38 | case 0x1: /* data processing */ | ||
| 39 | case 0x2: | ||
| 40 | -- | ||
| 41 | 2.12.2 | ||
| 42 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch deleted file mode 100644 index a599d0e191..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-tautological-compare-warning.patch +++ /dev/null | |||
| @@ -1,261 +0,0 @@ | |||
| 1 | From 0af8ced6376f2256b9daac301c851e1c99c3b035 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Adam Trhon <adam.trhon@tbs-biometrics.com> | ||
| 3 | Date: Fri, 12 May 2017 13:39:11 +0200 | ||
| 4 | Subject: [PATCH] Fix tautological compare warning | ||
| 5 | |||
| 6 | By default, gcc ignores warning from code generated by macros | ||
| 7 | (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80369). When | ||
| 8 | ltrace is compiled under icecream the warning *is generated* | ||
| 9 | (https://github.com/icecc/icecream/issues/202) | ||
| 10 | and the compilation fails (because of -Werror). | ||
| 11 | |||
| 12 | Upstream-Status: Submitted [ltrace-devel@lists.alioth.debian.org] | ||
| 13 | |||
| 14 | Signed-off-by: Adam Trhon <adam.trhon@tbs-biometrics.com> | ||
| 15 | --- | ||
| 16 | filter.c | 4 ++-- | ||
| 17 | sysdeps/linux-gnu/arm/fetch.c | 2 +- | ||
| 18 | sysdeps/linux-gnu/arm/trace.c | 2 +- | ||
| 19 | sysdeps/linux-gnu/ia64/fetch.c | 2 +- | ||
| 20 | sysdeps/linux-gnu/metag/trace.c | 2 +- | ||
| 21 | sysdeps/linux-gnu/mips/plt.c | 2 +- | ||
| 22 | sysdeps/linux-gnu/ppc/fetch.c | 2 +- | ||
| 23 | sysdeps/linux-gnu/ppc/plt.c | 2 +- | ||
| 24 | sysdeps/linux-gnu/ppc/trace.c | 4 ++-- | ||
| 25 | sysdeps/linux-gnu/s390/fetch.c | 2 +- | ||
| 26 | sysdeps/linux-gnu/s390/trace.c | 4 ++-- | ||
| 27 | sysdeps/linux-gnu/x86/fetch.c | 2 +- | ||
| 28 | sysdeps/linux-gnu/x86/trace.c | 4 ++-- | ||
| 29 | value.c | 4 ++-- | ||
| 30 | 14 files changed, 19 insertions(+), 19 deletions(-) | ||
| 31 | |||
| 32 | diff --git a/filter.c b/filter.c | ||
| 33 | index ba50c40..a65856d 100644 | ||
| 34 | --- a/filter.c | ||
| 35 | +++ b/filter.c | ||
| 36 | @@ -79,7 +79,7 @@ filter_lib_matcher_name_init(struct filter_lib_matcher *matcher, | ||
| 37 | { | ||
| 38 | switch (type) { | ||
| 39 | case FLM_MAIN: | ||
| 40 | - assert(type != type); | ||
| 41 | + assert(!"Unexpected value of type"); | ||
| 42 | abort(); | ||
| 43 | |||
| 44 | case FLM_SONAME: | ||
| 45 | @@ -137,7 +137,7 @@ matcher_matches_library(struct filter_lib_matcher *matcher, struct library *lib) | ||
| 46 | case FLM_MAIN: | ||
| 47 | return lib->type == LT_LIBTYPE_MAIN; | ||
| 48 | } | ||
| 49 | - assert(matcher->type != matcher->type); | ||
| 50 | + assert(!"Unexpected value of matcher->type"); | ||
| 51 | abort(); | ||
| 52 | } | ||
| 53 | |||
| 54 | diff --git a/sysdeps/linux-gnu/arm/fetch.c b/sysdeps/linux-gnu/arm/fetch.c | ||
| 55 | index b500448..8f75fcf 100644 | ||
| 56 | --- a/sysdeps/linux-gnu/arm/fetch.c | ||
| 57 | +++ b/sysdeps/linux-gnu/arm/fetch.c | ||
| 58 | @@ -317,7 +317,7 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, | ||
| 59 | memmove(data, ctx->regs.uregs, sz); | ||
| 60 | return 0; | ||
| 61 | } | ||
| 62 | - assert(info->type != info->type); | ||
| 63 | + assert(!"Unexpected value of info->type"); | ||
| 64 | abort(); | ||
| 65 | } | ||
| 66 | |||
| 67 | diff --git a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c | ||
| 68 | index 5e51e91..e76bf63 100644 | ||
| 69 | --- a/sysdeps/linux-gnu/arm/trace.c | ||
| 70 | +++ b/sysdeps/linux-gnu/arm/trace.c | ||
| 71 | @@ -701,7 +701,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) | ||
| 72 | return (size_t)-2; | ||
| 73 | |||
| 74 | default: | ||
| 75 | - assert(info->type != info->type); | ||
| 76 | + assert(!"Unexpected value of info->type"); | ||
| 77 | abort(); | ||
| 78 | } | ||
| 79 | } | ||
| 80 | diff --git a/sysdeps/linux-gnu/ia64/fetch.c b/sysdeps/linux-gnu/ia64/fetch.c | ||
| 81 | index 171c7a2..ee2fbc7 100644 | ||
| 82 | --- a/sysdeps/linux-gnu/ia64/fetch.c | ||
| 83 | +++ b/sysdeps/linux-gnu/ia64/fetch.c | ||
| 84 | @@ -409,7 +409,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type, | ||
| 85 | case ARGTYPE_ARRAY: | ||
| 86 | /* Arrays decay into pointers. XXX Fortran? */ | ||
| 87 | default: | ||
| 88 | - assert(info->type != info->type); | ||
| 89 | + assert(!"Unexpected value of info->type"); | ||
| 90 | abort(); | ||
| 91 | } | ||
| 92 | } | ||
| 93 | diff --git a/sysdeps/linux-gnu/metag/trace.c b/sysdeps/linux-gnu/metag/trace.c | ||
| 94 | index ad5fffe..7a843d6 100644 | ||
| 95 | --- a/sysdeps/linux-gnu/metag/trace.c | ||
| 96 | +++ b/sysdeps/linux-gnu/metag/trace.c | ||
| 97 | @@ -142,7 +142,7 @@ get_regval_from_unit(enum metag_unitnum unit, unsigned int reg, | ||
| 98 | return regs->ax[reg][0]; | ||
| 99 | /* We really shouldn't be here. */ | ||
| 100 | default: | ||
| 101 | - assert(unit != unit); | ||
| 102 | + assert(!"Unexpected value of unit"); | ||
| 103 | abort(); | ||
| 104 | } | ||
| 105 | return 0; | ||
| 106 | diff --git a/sysdeps/linux-gnu/mips/plt.c b/sysdeps/linux-gnu/mips/plt.c | ||
| 107 | index c7c10ac..ca2307d 100644 | ||
| 108 | --- a/sysdeps/linux-gnu/mips/plt.c | ||
| 109 | +++ b/sysdeps/linux-gnu/mips/plt.c | ||
| 110 | @@ -651,7 +651,7 @@ mips_stub_bp_continue(struct breakpoint *bp, struct process *proc) | ||
| 111 | break; | ||
| 112 | } | ||
| 113 | |||
| 114 | - assert(bp->libsym->arch.type != bp->libsym->arch.type); | ||
| 115 | + assert(!"Unexpected value of bp->libsym->arch.type"); | ||
| 116 | abort(); | ||
| 117 | } | ||
| 118 | |||
| 119 | diff --git a/sysdeps/linux-gnu/ppc/fetch.c b/sysdeps/linux-gnu/ppc/fetch.c | ||
| 120 | index c6cbd71..5db5675 100644 | ||
| 121 | --- a/sysdeps/linux-gnu/ppc/fetch.c | ||
| 122 | +++ b/sysdeps/linux-gnu/ppc/fetch.c | ||
| 123 | @@ -502,7 +502,7 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, | ||
| 124 | case ARGTYPE_ARRAY: | ||
| 125 | /* Arrays decay into pointers. XXX Fortran? */ | ||
| 126 | default: | ||
| 127 | - assert(info->type != info->type); | ||
| 128 | + assert(!"Unexpected value of info->type"); | ||
| 129 | abort(); | ||
| 130 | } | ||
| 131 | |||
| 132 | diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c | ||
| 133 | index 5f81889..781da03 100644 | ||
| 134 | --- a/sysdeps/linux-gnu/ppc/plt.c | ||
| 135 | +++ b/sysdeps/linux-gnu/ppc/plt.c | ||
| 136 | @@ -1085,7 +1085,7 @@ ppc_plt_bp_continue(struct breakpoint *bp, struct process *proc) | ||
| 137 | break; | ||
| 138 | } | ||
| 139 | |||
| 140 | - assert(bp->libsym->arch.type != bp->libsym->arch.type); | ||
| 141 | + assert(!"Unexpected value of bp->libsym->arch.type"); | ||
| 142 | abort(); | ||
| 143 | } | ||
| 144 | |||
| 145 | diff --git a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c | ||
| 146 | index 5aab538..caa6035 100644 | ||
| 147 | --- a/sysdeps/linux-gnu/ppc/trace.c | ||
| 148 | +++ b/sysdeps/linux-gnu/ppc/trace.c | ||
| 149 | @@ -217,7 +217,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) | ||
| 150 | return (size_t)-2; | ||
| 151 | |||
| 152 | default: | ||
| 153 | - assert(info->type != info->type); | ||
| 154 | + assert(!"Unexpected value of info->type"); | ||
| 155 | abort(); | ||
| 156 | break; | ||
| 157 | } | ||
| 158 | @@ -231,7 +231,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) | ||
| 159 | |||
| 160 | switch (info->type) { | ||
| 161 | default: | ||
| 162 | - assert(info->type != info->type); | ||
| 163 | + assert(!"Unexpected value of info->type"); | ||
| 164 | abort(); | ||
| 165 | break; | ||
| 166 | |||
| 167 | diff --git a/sysdeps/linux-gnu/s390/fetch.c b/sysdeps/linux-gnu/s390/fetch.c | ||
| 168 | index 4ad5951..4721c30 100644 | ||
| 169 | --- a/sysdeps/linux-gnu/s390/fetch.c | ||
| 170 | +++ b/sysdeps/linux-gnu/s390/fetch.c | ||
| 171 | @@ -266,7 +266,7 @@ arch_fetch_arg_next(struct fetch_context *ctx, enum tof type, | ||
| 172 | return allocate_gpr(ctx, proc, info, valuep, sz); | ||
| 173 | |||
| 174 | default: | ||
| 175 | - assert(info->type != info->type); | ||
| 176 | + assert(!"Unexpected value of info->type"); | ||
| 177 | abort(); | ||
| 178 | } | ||
| 179 | return -1; | ||
| 180 | diff --git a/sysdeps/linux-gnu/s390/trace.c b/sysdeps/linux-gnu/s390/trace.c | ||
| 181 | index 78b04c3..24f7801 100644 | ||
| 182 | --- a/sysdeps/linux-gnu/s390/trace.c | ||
| 183 | +++ b/sysdeps/linux-gnu/s390/trace.c | ||
| 184 | @@ -213,7 +213,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) | ||
| 185 | return (size_t)-2; | ||
| 186 | |||
| 187 | default: | ||
| 188 | - assert(info->type != info->type); | ||
| 189 | + assert(!"Unexpected value of info->type"); | ||
| 190 | abort(); | ||
| 191 | } | ||
| 192 | } | ||
| 193 | @@ -226,7 +226,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) | ||
| 194 | |||
| 195 | switch (info->type) { | ||
| 196 | default: | ||
| 197 | - assert(info->type != info->type); | ||
| 198 | + assert(!"Unexpected value of info->type"); | ||
| 199 | break; | ||
| 200 | |||
| 201 | case ARGTYPE_CHAR: | ||
| 202 | diff --git a/sysdeps/linux-gnu/x86/fetch.c b/sysdeps/linux-gnu/x86/fetch.c | ||
| 203 | index 6868101..ae2ed79 100644 | ||
| 204 | --- a/sysdeps/linux-gnu/x86/fetch.c | ||
| 205 | +++ b/sysdeps/linux-gnu/x86/fetch.c | ||
| 206 | @@ -523,7 +523,7 @@ classify(struct process *proc, struct fetch_context *context, | ||
| 207 | |||
| 208 | default: | ||
| 209 | /* Unsupported type. */ | ||
| 210 | - assert(info->type != info->type); | ||
| 211 | + assert(!"Unexpected value of info->type"); | ||
| 212 | abort(); | ||
| 213 | } | ||
| 214 | abort(); | ||
| 215 | diff --git a/sysdeps/linux-gnu/x86/trace.c b/sysdeps/linux-gnu/x86/trace.c | ||
| 216 | index 6a1a6a5..d8d2115 100644 | ||
| 217 | --- a/sysdeps/linux-gnu/x86/trace.c | ||
| 218 | +++ b/sysdeps/linux-gnu/x86/trace.c | ||
| 219 | @@ -145,7 +145,7 @@ arch_type_sizeof(struct process *proc, struct arg_type_info *info) | ||
| 220 | return (size_t)-2; | ||
| 221 | |||
| 222 | default: | ||
| 223 | - assert(info->type != info->type); | ||
| 224 | + assert(!"Unexpected value of info->type"); | ||
| 225 | abort(); | ||
| 226 | } | ||
| 227 | } | ||
| 228 | @@ -158,7 +158,7 @@ arch_type_alignof(struct process *proc, struct arg_type_info *info) | ||
| 229 | |||
| 230 | switch (info->type) { | ||
| 231 | default: | ||
| 232 | - assert(info->type != info->type); | ||
| 233 | + assert(!"Unexpected value of info->type"); | ||
| 234 | abort(); | ||
| 235 | break; | ||
| 236 | |||
| 237 | diff --git a/value.c b/value.c | ||
| 238 | index 2125ba9..30edb4e 100644 | ||
| 239 | --- a/value.c | ||
| 240 | +++ b/value.c | ||
| 241 | @@ -363,7 +363,7 @@ value_set_word(struct value *value, long word) | ||
| 242 | u.u64 = word; | ||
| 243 | break; | ||
| 244 | default: | ||
| 245 | - assert(sz != sz); | ||
| 246 | + assert(!"Unexpected value of sz"); | ||
| 247 | abort(); | ||
| 248 | } | ||
| 249 | |||
| 250 | @@ -414,7 +414,7 @@ value_extract_word(struct value *value, long *retp, | ||
| 251 | *retp = (long)u.u64; | ||
| 252 | return 0; | ||
| 253 | default: | ||
| 254 | - assert(sz != sz); | ||
| 255 | + assert(!"Unexpected value of sz"); | ||
| 256 | abort(); | ||
| 257 | } | ||
| 258 | } | ||
| 259 | -- | ||
| 260 | 2.12.0 | ||
| 261 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch deleted file mode 100644 index 9def41ca60..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ensure-the-struct-pointers-are-null-initilized.patch +++ /dev/null | |||
| @@ -1,46 +0,0 @@ | |||
| 1 | From 67a8fa478a4484bc4dbfb3ac74e11be1dd5af594 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 23 Dec 2019 19:35:48 -0800 | ||
| 4 | Subject: [PATCH] ensure the struct pointers are null initilized | ||
| 5 | |||
| 6 | Do not delete if pointer is already null | ||
| 7 | |||
| 8 | Upstream-Status: Pending | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | expr.c | 10 +++++----- | ||
| 13 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
| 14 | |||
| 15 | diff --git a/expr.c b/expr.c | ||
| 16 | index 4059a32..5ffd0ad 100644 | ||
| 17 | --- a/expr.c | ||
| 18 | +++ b/expr.c | ||
| 19 | @@ -189,10 +189,8 @@ int | ||
| 20 | expr_clone(struct expr_node *retp, const struct expr_node *node) | ||
| 21 | { | ||
| 22 | *retp = *node; | ||
| 23 | - | ||
| 24 | + struct expr_node *nlhs = 0, *nrhs = 0; | ||
| 25 | switch (node->kind) { | ||
| 26 | - struct expr_node *nlhs; | ||
| 27 | - struct expr_node *nrhs; | ||
| 28 | |||
| 29 | case EXPR_OP_ARGNO: | ||
| 30 | case EXPR_OP_SELF: | ||
| 31 | @@ -236,8 +234,10 @@ expr_clone(struct expr_node *retp, const struct expr_node *node) | ||
| 32 | if (expr_alloc_and_clone(&nlhs, node->lhs, node->own_lhs) < 0) { | ||
| 33 | if (node->kind == EXPR_OP_CALL2 | ||
| 34 | && node->u.call.own_rhs) { | ||
| 35 | - expr_destroy(nrhs); | ||
| 36 | - free(nrhs); | ||
| 37 | + if (nrhs) { | ||
| 38 | + expr_destroy(nrhs); | ||
| 39 | + free(nrhs); | ||
| 40 | + } | ||
| 41 | return -1; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | -- | ||
| 45 | 2.24.1 | ||
| 46 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch deleted file mode 100644 index 4793e561c0..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch +++ /dev/null | |||
| @@ -1,29 +0,0 @@ | |||
| 1 | From f47672bed5905ae382e80b09dafca9a8da45aa67 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 19 Apr 2022 18:44:36 -0700 | ||
| 4 | Subject: [PATCH] ppc/plt: do not free symbol libsym | ||
| 5 | |||
| 6 | delete_symbol_chain() will call free as well if sybol is non-null | ||
| 7 | it also fixes use-after-free warnings that compiler emits | ||
| 8 | |||
| 9 | Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/2] | ||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | sysdeps/linux-gnu/ppc/plt.c | 1 - | ||
| 13 | 1 file changed, 1 deletion(-) | ||
| 14 | |||
| 15 | diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c | ||
| 16 | index 5f81889..7c1c025 100644 | ||
| 17 | --- a/sysdeps/linux-gnu/ppc/plt.c | ||
| 18 | +++ b/sysdeps/linux-gnu/ppc/plt.c | ||
| 19 | @@ -687,7 +687,6 @@ arch_elf_add_func_entry(struct process *proc, struct ltelf *lte, | ||
| 20 | if (libsym == NULL | ||
| 21 | || library_symbol_init(libsym, addr, full_name, 1, | ||
| 22 | LS_TOPLT_NONE) < 0) { | ||
| 23 | - free(libsym); | ||
| 24 | delete_symbol_chain(libsym); | ||
| 25 | libsym = NULL; | ||
| 26 | fprintf(stderr, "Couldn't add symbol %s" | ||
| 27 | -- | ||
| 28 | 2.36.0 | ||
| 29 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch new file mode 100644 index 0000000000..3e166f0deb --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch | |||
| @@ -0,0 +1,34 @@ | |||
| 1 | From f2f6082cb112cf3b8a6a5bfc989e4a4f6a1bff27 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Tue, 3 Sep 2024 20:41:20 +0000 | ||
| 4 | Subject: [PATCH] proc: Make PROC_PID_FILE not use variable length array | ||
| 5 | |||
| 6 | This helps in compiling with clang which is not happy about VLA | ||
| 7 | |||
| 8 | | ../../../git/sysdeps/linux-gnu/proc.c:70:3: error: variable length array folded to constant array as an extension [-Werror,-Wgnu-folding-constant] | ||
| 9 | | 70 | PROC_PID_FILE(proc_exe, "/proc/%d/exe", pid); | ||
| 10 | | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 11 | | ../../../git/sysdeps/linux-gnu/proc.c:59:11: note: expanded from macro 'PROC_PID_FILE' | ||
| 12 | | 59 | char VAR[strlen(FORMAT) + 6]; \ | ||
| 13 | | | ^~~~~~~~~~~~~~~~~~ | ||
| 14 | |||
| 15 | Upstream-Status: Pending | ||
| 16 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 17 | --- | ||
| 18 | sysdeps/linux-gnu/proc.c | 3 ++- | ||
| 19 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
| 20 | |||
| 21 | diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c | ||
| 22 | index b954997..f37e4e8 100644 | ||
| 23 | --- a/sysdeps/linux-gnu/proc.c | ||
| 24 | +++ b/sysdeps/linux-gnu/proc.c | ||
| 25 | @@ -56,7 +56,8 @@ | ||
| 26 | #define MAX_DELAY 100000 /* 100000 microseconds = 0.1 seconds */ | ||
| 27 | |||
| 28 | #define PROC_PID_FILE(VAR, FORMAT, PID) \ | ||
| 29 | - char VAR[strlen(FORMAT) + 6]; \ | ||
| 30 | + enum { buflen_ ## VAR = strlen(FORMAT)}; \ | ||
| 31 | + char VAR[buflen_ ## VAR + 6]; \ | ||
| 32 | sprintf(VAR, FORMAT, PID) | ||
| 33 | |||
| 34 | /* | ||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch deleted file mode 100644 index 65c7d535eb..0000000000 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-replace-readdir_r-with-readdir.patch +++ /dev/null | |||
| @@ -1,36 +0,0 @@ | |||
| 1 | From 64f98f84fd88797e219f9dde1ca387fee4b509f0 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Sun, 24 Apr 2016 16:58:17 -0700 | ||
| 4 | Subject: [PATCH] replace readdir_r with readdir | ||
| 5 | |||
| 6 | glibc 2.24 has deprecated readdir_r | ||
| 7 | |||
| 8 | https://sourceware.org/ml/libc-alpha/2016-02/msg00093.html | ||
| 9 | |||
| 10 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 11 | --- | ||
| 12 | Upstream-Status: Submitted | ||
| 13 | |||
| 14 | sysdeps/linux-gnu/proc.c | 5 +++-- | ||
| 15 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
| 16 | |||
| 17 | diff --git a/sysdeps/linux-gnu/proc.c b/sysdeps/linux-gnu/proc.c | ||
| 18 | index 953fd86..edb716d 100644 | ||
| 19 | --- a/sysdeps/linux-gnu/proc.c | ||
| 20 | +++ b/sysdeps/linux-gnu/proc.c | ||
| 21 | @@ -242,9 +242,10 @@ process_tasks(pid_t pid, pid_t **ret_tasks, size_t *ret_n) | ||
| 22 | size_t alloc = 0; | ||
| 23 | |||
| 24 | while (1) { | ||
| 25 | - struct dirent entry; | ||
| 26 | struct dirent *result; | ||
| 27 | - if (readdir_r(d, &entry, &result) != 0) { | ||
| 28 | + errno = 0; | ||
| 29 | + result = readdir(d); | ||
| 30 | + if (errno != 0) { | ||
| 31 | fail: | ||
| 32 | free(tasks); | ||
| 33 | closedir(d); | ||
| 34 | -- | ||
| 35 | 2.8.0 | ||
| 36 | |||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 63971970cf..a3ddf2a76b 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb | |||
| @@ -11,27 +11,23 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" | |||
| 11 | 11 | ||
| 12 | PE = "1" | 12 | PE = "1" |
| 13 | PV = "7.91+git" | 13 | PV = "7.91+git" |
| 14 | SRCREV = "c22d359433b333937ee3d803450dc41998115685" | 14 | SRCREV = "8eabf684ba6b11ae7a1a843aca3c0657c6329d73" |
| 15 | 15 | ||
| 16 | DEPENDS = "elfutils" | 16 | DEPENDS = "elfutils" |
| 17 | SRC_URI = "git://github.com/sparkleholic/ltrace.git;protocol=https;branch=master \ | 17 | SRC_URI = "git://gitlab.com/cespedes/ltrace.git;protocol=https;branch=main \ |
| 18 | file://configure-allow-to-disable-selinux-support.patch \ | 18 | file://configure-allow-to-disable-selinux-support.patch \ |
| 19 | file://0001-replace-readdir_r-with-readdir.patch \ | ||
| 20 | file://0001-Use-correct-enum-type.patch \ | 19 | file://0001-Use-correct-enum-type.patch \ |
| 21 | file://0002-Fix-const-qualifier-error.patch \ | 20 | file://0002-Fix-const-qualifier-error.patch \ |
| 22 | file://0001-ARM-code-has-unreachable-code-after-switch-statement.patch \ | ||
| 23 | file://0001-Fix-tautological-compare-warning.patch \ | ||
| 24 | file://0001-Add-support-for-mips64-n32-n64.patch \ | 21 | file://0001-Add-support-for-mips64-n32-n64.patch \ |
| 25 | file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ | 22 | file://0001-configure-Recognise-linux-musl-as-a-host-OS.patch \ |
| 26 | file://0001-mips-plt.c-Delete-include-error.h.patch \ | 23 | file://0001-mips-plt.c-Delete-include-error.h.patch \ |
| 27 | file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ | 24 | file://0001-move-fprintf-into-same-block-where-modname-and-symna.patch \ |
| 28 | file://0001-hook-Do-not-append-int-to-std-string.patch \ | 25 | file://0001-hook-Do-not-append-int-to-std-string.patch \ |
| 29 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ | 26 | file://0001-Bug-fix-for-data-type-length-judgment.patch \ |
| 30 | file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ | ||
| 31 | file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ | 27 | file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ |
| 32 | file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ | 28 | file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ |
| 33 | file://0001-ppc-plt-do-not-free-symbol-libsym.patch \ | ||
| 34 | file://0001-Fix-type-of-single-bit-bitfields.patch \ | 29 | file://0001-Fix-type-of-single-bit-bitfields.patch \ |
| 30 | file://0001-proc-Make-PROC_PID_FILE-not-use-variable-length-arra.patch \ | ||
| 35 | " | 31 | " |
| 36 | SRC_URI:append:libc-musl = " file://add_ppc64le.patch" | 32 | SRC_URI:append:libc-musl = " file://add_ppc64le.patch" |
| 37 | 33 | ||
