diff options
Diffstat (limited to 'meta-oe/recipes-devtools/ltrace')
10 files changed, 134 insertions, 3 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 index 4d0e0392f7..c896e3ebb0 100644 --- 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 @@ -11,6 +11,8 @@ sysdeps/linux-gnu/arm/trace.c:173:33: error: statement will never be executed [- Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/arm/trace.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch new file mode 100644 index 0000000000..61932269bd --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch @@ -0,0 +1,86 @@ +From 491b3b153f6b5cbf2d23a9778e5676eb29a6705f Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Mon, 6 Feb 2023 16:37:19 -0800 +Subject: [PATCH] Fix type of single bit bitfields + +clang16 warns +trace.c:311:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] + +quash the warning by using an unsigned type to allow +an assignment of 0 or 1 without implicit conversion. + +Upstream-Status: Pending +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + library.h | 6 +++--- + prototype.h | 2 +- + sysdeps/linux-gnu/trace.h | 10 +++++----- + 3 files changed, 9 insertions(+), 9 deletions(-) + +--- a/library.h ++++ b/library.h +@@ -71,20 +71,20 @@ struct library_symbol { + * looking up one in LIB->protolib. */ + struct prototype *proto; + +- int own_name : 1; ++ unsigned int own_name : 1; + + /* This is relevant for PLT symbols. Latent PLT symbols are + * those that don't match any of the -e rules, but that might + * potentially become active if a library implementing them + * appears that matches a -l rule. Ltrace core is responsible + * for clearing latent flag. */ +- int latent : 1; ++ unsigned latent : 1; + + /* Delayed symbols are those for which a breakpoint shouldn't + * be enabled yet. They are similar to latent symbols, but + * backend is responsible for clearing the delayed flag. See + * proc_activate_delayed_symbol. */ +- int delayed : 1; ++ unsigned int delayed : 1; + + struct arch_library_symbol_data arch; + struct os_library_symbol_data os; +--- a/prototype.h ++++ b/prototype.h +@@ -162,7 +162,7 @@ struct protolib_cache { + + /* For tracking uses of cache during cache's own + * initialization. */ +- int bootstrap : 1; ++ unsigned int bootstrap : 1; + }; + + /* Initialize CACHE. Returns 0 on success or a negative value on +--- a/sysdeps/linux-gnu/trace.h ++++ b/sysdeps/linux-gnu/trace.h +@@ -33,11 +33,11 @@ + struct pid_task { + pid_t pid; /* This may be 0 for tasks that exited + * mid-handling. */ +- int sigstopped : 1; +- int got_event : 1; +- int delivered : 1; +- int vforked : 1; +- int sysret : 1; ++ unsigned int sigstopped : 1; ++ unsigned int got_event : 1; ++ unsigned int delivered : 1; ++ unsigned int vforked : 1; ++ unsigned int sysret : 1; + }; + + struct pid_set { +--- a/sysdeps/linux-gnu/trace.c ++++ b/sysdeps/linux-gnu/trace.c +@@ -1043,7 +1043,7 @@ ltrace_exiting_install_handler(struct pr + struct process_vfork_handler + { + struct event_handler super; +- int vfork_bp_refd:1; ++ unsigned int vfork_bp_refd:1; + }; + + static Event * diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch index 01a35842c8..38a7d055dc 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Use-correct-enum-type.patch @@ -7,6 +7,8 @@ Clang warns about wrong enum initializtion Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/aarch64/fetch.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch index 52264a17e6..f3a6d9e599 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-configure-Recognise-linux-musl-as-a-host-OS.patch @@ -5,6 +5,8 @@ Subject: [PATCH] configure: Recognise linux-musl as a host OS Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + configure.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch index 76ba7de785..ce4dcf8a98 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-mips-plt.c-Delete-include-error.h.patch @@ -7,6 +7,8 @@ Its not needed Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/mips/plt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch index 39e1f77a0a..35062debf2 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-Remove-unused-host_powerpc64-function.patch @@ -8,6 +8,8 @@ with clang Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + sysdeps/linux-gnu/ppc/plt.c | 10 ---------- 1 file changed, 10 deletions(-) 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 new file mode 100644 index 0000000000..4793e561c0 --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-ppc-plt-do-not-free-symbol-libsym.patch @@ -0,0 +1,29 @@ +From f47672bed5905ae382e80b09dafca9a8da45aa67 Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Tue, 19 Apr 2022 18:44:36 -0700 +Subject: [PATCH] ppc/plt: do not free symbol libsym + +delete_symbol_chain() will call free as well if sybol is non-null +it also fixes use-after-free warnings that compiler emits + +Upstream-Status: Submitted [https://gitlab.com/cespedes/ltrace/-/merge_requests/2] +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + sysdeps/linux-gnu/ppc/plt.c | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 5f81889..7c1c025 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -687,7 +687,6 @@ arch_elf_add_func_entry(struct process *proc, struct ltelf *lte, + if (libsym == NULL + || library_symbol_init(libsym, addr, full_name, 1, + LS_TOPLT_NONE) < 0) { +- free(libsym); + delete_symbol_chain(libsym); + libsym = NULL; + fprintf(stderr, "Couldn't add symbol %s" +-- +2.36.0 + diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch index c152771923..f78db5b0db 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0002-Fix-const-qualifier-error.patch @@ -8,6 +8,8 @@ error: duplicate 'const' declaration specifier [-Werror,-Wduplicate-decl-specifi Signed-off-by: Khem Raj <raj.khem@gmail.com> --- +Upstream-Status: Pending + dict.h | 2 +- library.c | 2 +- vect.h | 2 +- diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch index dff61b1502..dcd0285db6 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch +++ b/meta-oe/recipes-devtools/ltrace/ltrace/add_ppc64le.patch @@ -1,3 +1,5 @@ +Upstream-Status: Pending + --- a/sysdeps/linux-gnu/ppc/ptrace.h +++ b/sysdeps/linux-gnu/ppc/ptrace.h @@ -18,4 +18,5 @@ diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index b6fb1dcdd2..63971970cf 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb @@ -6,15 +6,15 @@ It can also intercept and print the system calls executed by the program.\ " HOMEPAGE = "http://ltrace.org/" -LICENSE = "GPLv2" +LICENSE = "GPL-2.0-only" LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a" PE = "1" -PV = "7.91+git${SRCPV}" +PV = "7.91+git" SRCREV = "c22d359433b333937ee3d803450dc41998115685" DEPENDS = "elfutils" -SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http;protocol=https \ +SRC_URI = "git://github.com/sparkleholic/ltrace.git;protocol=https;branch=master \ file://configure-allow-to-disable-selinux-support.patch \ file://0001-replace-readdir_r-with-readdir.patch \ file://0001-Use-correct-enum-type.patch \ @@ -30,6 +30,8 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http; file://0001-ensure-the-struct-pointers-are-null-initilized.patch \ file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ + file://0001-ppc-plt-do-not-free-symbol-libsym.patch \ + file://0001-Fix-type-of-single-bit-bitfields.patch \ " SRC_URI:append:libc-musl = " file://add_ppc64le.patch" |