From 6c89dc47a4782e732158adb7d1c5fc2f9545452a Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 7 Oct 2013 10:25:37 +0200 Subject: [PATCH 001/100] Correct Source: tag --- ltrace.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index eaadbc9..0275608 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -13,7 +13,7 @@ BuildRequires: autoconf automake libtool # Note: this URL needs to be updated for each release, as the file # number changes for each file. Full list of released files is at: # https://alioth.debian.org/frs/?group_id=30892 -Source: http://alioth.debian.org/frs/download.php/3848/ltrace-0.7.2.tar.bz2 +Source: http://alioth.debian.org/frs/download.php/file/3848/ltrace-0.7.2.tar.bz2 # Many small fixes brought from master branch. Patch0: ltrace-0.7.2-bits.patch From 1ce581092252b4ff4cab33290086c6be6126c9f1 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 5 Nov 2013 04:04:52 +0100 Subject: [PATCH 002/100] Rebase to a pre-release 0.8 --- .gitignore | 1 + ltrace.spec | 32 +++++++++----------------------- sources | 2 +- 3 files changed, 11 insertions(+), 24 deletions(-) diff --git a/.gitignore b/.gitignore index 1449a76..45c391d 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ ltrace-*/ /ltrace-0.6.0.tar.bz2 /ltrace-0.7.0.tar.bz2 /ltrace-0.7.2.tar.bz2 +/ltrace-0.7.91.tar.bz2 diff --git a/ltrace.spec b/ltrace.spec index 0275608..0b090ad 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,31 +1,18 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace -Version: 0.7.2 -Release: 7%{?dist} +Version: 0.7.91 +Release: 1%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers BuildRequires: elfutils-libelf-devel dejagnu BuildRequires: libselinux-devel -BuildRequires: autoconf automake libtool # Note: this URL needs to be updated for each release, as the file # number changes for each file. Full list of released files is at: # https://alioth.debian.org/frs/?group_id=30892 -Source: http://alioth.debian.org/frs/download.php/file/3848/ltrace-0.7.2.tar.bz2 - -# Many small fixes brought from master branch. -Patch0: ltrace-0.7.2-bits.patch - -# Upstream patch which introduces support for ARM architecture. -Patch1: ltrace-0.7.2-arm.patch - -# Work around a recently-added GCC warning. -Patch2: ltrace-0.7.2-unused-typedef.patch - -# s390 set_instruction_pointer: Set highest bit in 31-bit tracer -Patch3: ltrace-0.7.2-s390-set_instruction_pointer.patch +Source: ltrace-%{version}.tar.bz2 %description Ltrace is a debugging program which runs a specified command until the @@ -38,14 +25,9 @@ You should install ltrace if you need a sysadmin tool for tracking the execution of processes. %prep -%setup -q -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 +%setup -q -n %{name}-%{version} %build -autoreconf -i %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} make %{?_smp_mflags} @@ -65,9 +47,13 @@ echo ====================TESTING END===================== %{_bindir}/ltrace %{_mandir}/man1/ltrace.1* %{_mandir}/man5/ltrace.conf.5* -%config(noreplace) %{_sysconfdir}/ltrace.conf +%{_datadir}/ltrace %changelog +* Tue Nov 5 2013 Petr Machata - 0.7.91-1 +- Rebase to a pre-release 0.8 +- Drop BR on autoconf and friends + * Wed Aug 7 2013 Ville Skyttä - 0.7.2-7 - Install docs to %%{_pkgdocdir} where available (#992149). diff --git a/sources b/sources index 852c53d..a8420d6 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -f5d9282b471cdf9fbafd916ec5be0717 ltrace-0.7.2.tar.bz2 +9db3bdee7cf3e11c87d8cc7673d4d25b ltrace-0.7.91.tar.bz2 From 51c97fb59ecdb0d6e9632a0a8cc36e2e737be0c8 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 5 Nov 2013 04:58:05 +0100 Subject: [PATCH 003/100] Fix building on ARM --- ltrace-0.7.91-arm.patch | 610 ++++++++++++++++++++++++++++++++++++++++ ltrace.spec | 4 + 2 files changed, 614 insertions(+) create mode 100644 ltrace-0.7.91-arm.patch diff --git a/ltrace-0.7.91-arm.patch b/ltrace-0.7.91-arm.patch new file mode 100644 index 0000000..84c7d0d --- /dev/null +++ b/ltrace-0.7.91-arm.patch @@ -0,0 +1,610 @@ +diff --git a/ltrace-elf.c b/ltrace-elf.c +index 92b642b..6f86d56 100644 +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -531,6 +531,38 @@ elf_read_relocs(struct ltelf *lte, Elf_Scn *scn, GElf_Shdr *shdr, + return 0; + } + ++int ++elf_load_dynamic_entry(struct ltelf *lte, int tag, GElf_Addr *valuep) ++{ ++ Elf_Scn *scn; ++ GElf_Shdr shdr; ++ if (elf_get_section_type(lte, SHT_DYNAMIC, &scn, &shdr) < 0 ++ || scn == NULL) { ++ fail: ++ fprintf(stderr, "Couldn't get SHT_DYNAMIC: %s\n", ++ elf_errmsg(-1)); ++ return -1; ++ } ++ ++ Elf_Data *data = elf_loaddata(scn, &shdr); ++ if (data == NULL) ++ goto fail; ++ ++ size_t j; ++ for (j = 0; j < shdr.sh_size / shdr.sh_entsize; ++j) { ++ GElf_Dyn dyn; ++ if (gelf_getdyn(data, j, &dyn) == NULL) ++ goto fail; ++ ++ if(dyn.d_tag == tag) { ++ *valuep = dyn.d_un.d_ptr; ++ return 0; ++ } ++ } ++ ++ return -1; ++} ++ + static int + ltelf_read_elf(struct ltelf *lte, const char *filename) + { +diff --git a/ltrace-elf.h b/ltrace-elf.h +index ea14512..db4ffe9 100644 +--- a/ltrace-elf.h ++++ b/ltrace-elf.h +@@ -139,6 +139,10 @@ struct elf_each_symbol_t { + int elf_read_relocs(struct ltelf *lte, Elf_Scn *scn, GElf_Shdr *shdr, + struct vect *rela_vec); + ++/* Read a given DT_ TAG from LTE. Value is returned in *VALUEP. ++ * Returns 0 on success or a negative value on failure. */ ++int elf_load_dynamic_entry(struct ltelf *lte, int tag, GElf_Addr *valuep); ++ + /* Read, respectively, 1, 2, 4, or 8 bytes from Elf data at given + * OFFSET, and store it in *RETP. Returns 0 on success or a negative + * value if there's not enough data. */ +diff --git a/sysdeps/linux-gnu/arm/arch.h b/sysdeps/linux-gnu/arm/arch.h +index 58a7fdf..6d0d902 100644 +--- a/sysdeps/linux-gnu/arm/arch.h ++++ b/sysdeps/linux-gnu/arm/arch.h +@@ -22,6 +22,8 @@ + #ifndef LTRACE_ARM_ARCH_H + #define LTRACE_ARM_ARCH_H + ++#include ++ + #define ARCH_HAVE_ENABLE_BREAKPOINT 1 + #define ARCH_HAVE_DISABLE_BREAKPOINT 1 + +@@ -47,7 +49,7 @@ struct arch_breakpoint_data { + + #define ARCH_HAVE_LTELF_DATA + struct arch_ltelf_data { +- /* We have this only for the hooks. */ ++ Elf_Data *jmprel_data; + }; + + #define ARCH_HAVE_LIBRARY_DATA +diff --git a/sysdeps/linux-gnu/arm/fetch.c b/sysdeps/linux-gnu/arm/fetch.c +index 5081d78..b500448 100644 +--- a/sysdeps/linux-gnu/arm/fetch.c ++++ b/sysdeps/linux-gnu/arm/fetch.c +@@ -32,200 +32,12 @@ + #include "backend.h" + #include "fetch.h" + #include "library.h" +-#include "ltrace-elf.h" + #include "proc.h" + #include "ptrace.h" + #include "regs.h" + #include "type.h" + #include "value.h" + +-static int +-get_hardfp(uint64_t abi_vfp_args) +-{ +- if (abi_vfp_args == 2) +- fprintf(stderr, +- "Tag_ABI_VFP_args value 2 (tool chain-specific " +- "conventions) not supported.\n"); +- return abi_vfp_args == 1; +-} +- +-int +-arch_elf_init(struct ltelf *lte, struct library *lib) +-{ +- /* Nothing in this section is strictly critical. It's not +- * that much of a deal if we fail to guess right whether the +- * ABI is softfp or hardfp. */ +- unsigned hardfp = 0; +- +- Elf_Scn *scn; +- Elf_Data *data; +- GElf_Shdr shdr; +- if (elf_get_section_type(lte, SHT_ARM_ATTRIBUTES, &scn, &shdr) < 0 +- || (scn != NULL && (data = elf_loaddata(scn, &shdr)) == NULL)) { +- fprintf(stderr, +- "Error when obtaining ARM attribute section: %s\n", +- elf_errmsg(-1)); +- goto done; +- +- } else if (scn != NULL && data != NULL) { +- GElf_Xword offset = 0; +- uint8_t version; +- if (elf_read_next_u8(data, &offset, &version) < 0) { +- goto done; +- } else if (version != 'A') { +- fprintf(stderr, "Unsupported ARM attribute section " +- "version %d ('%c').\n", version, version); +- goto done; +- } +- +- do { +- const char signature[] = "aeabi"; +- /* N.B. LEN is including the length field +- * itself. */ +- uint32_t sec_len; +- if (elf_read_u32(data, offset, &sec_len) < 0 +- || !elf_can_read_next(data, offset, sec_len)) { +- goto done; +- } +- const GElf_Xword next_offset = offset + sec_len; +- offset += 4; +- +- if (sec_len < 4 + sizeof signature +- || strcmp(signature, data->d_buf + offset) != 0) +- goto skip; +- offset += sizeof signature; +- +- const GElf_Xword offset0 = offset; +- uint64_t tag; +- uint32_t sub_len; +- if (elf_read_next_uleb128(data, &offset, &tag) < 0 +- || elf_read_next_u32(data, &offset, &sub_len) < 0 +- || !elf_can_read_next(data, offset0, sub_len)) +- goto done; +- +- if (tag != 1) +- /* IHI0045D_ABI_addenda: "section and +- * symbol attributes are deprecated +- * [...] consumers are permitted to +- * ignore them." */ +- goto skip; +- +- while (offset < offset0 + sub_len) { +- if (elf_read_next_uleb128(data, +- &offset, &tag) < 0) +- goto done; +- +- switch (tag) { +- uint64_t v; +- case 6: /* Tag_CPU_arch */ +- case 7: /* Tag_CPU_arch_profile */ +- case 8: /* Tag_ARM_ISA_use */ +- case 9: /* Tag_THUMB_ISA_use */ +- case 10: /* Tag_FP_arch */ +- case 11: /* Tag_WMMX_arch */ +- case 12: /* Tag_Advanced_SIMD_arch */ +- case 13: /* Tag_PCS_config */ +- case 14: /* Tag_ABI_PCS_R9_use */ +- case 15: /* Tag_ABI_PCS_RW_data */ +- case 16: /* Tag_ABI_PCS_RO_data */ +- case 17: /* Tag_ABI_PCS_GOT_use */ +- case 18: /* Tag_ABI_PCS_wchar_t */ +- case 19: /* Tag_ABI_FP_rounding */ +- case 20: /* Tag_ABI_FP_denormal */ +- case 21: /* Tag_ABI_FP_exceptions */ +- case 22: /* Tag_ABI_FP_user_exceptions */ +- case 23: /* Tag_ABI_FP_number_model */ +- case 24: /* Tag_ABI_align_needed */ +- case 25: /* Tag_ABI_align_preserved */ +- case 26: /* Tag_ABI_enum_size */ +- case 27: /* Tag_ABI_HardFP_use */ +- case 28: /* Tag_ABI_VFP_args */ +- case 29: /* Tag_ABI_WMMX_args */ +- case 30: /* Tag_ABI_optimization_goals */ +- case 31: /* Tag_ABI_FP_optimization_goals */ +- case 32: /* Tag_compatibility */ +- case 34: /* Tag_CPU_unaligned_access */ +- case 36: /* Tag_FP_HP_extension */ +- case 38: /* Tag_ABI_FP_16bit_format */ +- case 42: /* Tag_MPextension_use */ +- case 70: /* Tag_MPextension_use as well */ +- case 44: /* Tag_DIV_use */ +- case 64: /* Tag_nodefaults */ +- case 66: /* Tag_T2EE_use */ +- case 68: /* Tag_Virtualization_use */ +- uleb128: +- if (elf_read_next_uleb128 +- (data, &offset, &v) < 0) +- goto done; +- if (tag == 28) +- hardfp = get_hardfp(v); +- if (tag != 32) +- continue; +- +- /* Tag 32 has two arguments, +- * fall through. */ +- +- case 4: /* Tag_CPU_raw_name */ +- case 5: /* Tag_CPU_name */ +- case 65: /* Tag_also_compatible_with */ +- case 67: /* Tag_conformance */ +- ntbs: +- offset += strlen(data->d_buf +- + offset) + 1; +- continue; +- } +- +- /* Handle unknown tags in a generic +- * manner, if possible. */ +- if (tag <= 32) { +- fprintf(stderr, +- "Unknown tag %lld " +- "at offset %#llx " +- "of ARM attribute section.", +- tag, offset); +- goto skip; +- } else if (tag % 2 == 0) { +- goto uleb128; +- } else { +- goto ntbs; +- } +- } +- +- skip: +- offset = next_offset; +- +- } while (elf_can_read_next(data, offset, 1)); +- +- } +- +-done: +- lib->arch.hardfp = hardfp; +- return 0; +-} +- +-void +-arch_elf_destroy(struct ltelf *lte) +-{ +-} +- +-int +-arch_library_init(struct library *lib) +-{ +- return 0; +-} +- +-void +-arch_library_destroy(struct library *lib) +-{ +-} +- +-int +-arch_library_clone(struct library *retp, struct library *lib) +-{ +- retp->arch = lib->arch; +- return 0; +-} +- + enum { + /* How many (double) VFP registers the AAPCS uses for + * parameter passing. */ +diff --git a/sysdeps/linux-gnu/arm/plt.c b/sysdeps/linux-gnu/arm/plt.c +index d1bf7ca..9e9e37f 100644 +--- a/sysdeps/linux-gnu/arm/plt.c ++++ b/sysdeps/linux-gnu/arm/plt.c +@@ -1,5 +1,6 @@ + /* + * This file is part of ltrace. ++ * Copyright (C) 2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2010 Zach Welch, CodeSourcery + * Copyright (C) 2004,2008,2009 Juan Cespedes + * +@@ -20,20 +21,205 @@ + */ + + #include ++#include ++#include + + #include "proc.h" + #include "library.h" + #include "ltrace-elf.h" + + static int ++get_hardfp(uint64_t abi_vfp_args) ++{ ++ if (abi_vfp_args == 2) ++ fprintf(stderr, ++ "Tag_ABI_VFP_args value 2 (tool chain-specific " ++ "conventions) not supported.\n"); ++ return abi_vfp_args == 1; ++} ++ ++int ++arch_elf_init(struct ltelf *lte, struct library *lib) ++{ ++ GElf_Addr jmprel_addr; ++ Elf_Scn *jmprel_sec; ++ GElf_Shdr jmprel_shdr; ++ if (elf_load_dynamic_entry(lte, DT_JMPREL, &jmprel_addr) < 0 ++ || elf_get_section_covering(lte, jmprel_addr, ++ &jmprel_sec, &jmprel_shdr) < 0 ++ || jmprel_sec == NULL) ++ return -1; ++ ++ lte->arch.jmprel_data = elf_loaddata(jmprel_sec, &jmprel_shdr); ++ if (lte->arch.jmprel_data == NULL) ++ return -1; ++ ++ /* Nothing in this section is strictly critical. It's not ++ * that much of a deal if we fail to guess right whether the ++ * ABI is softfp or hardfp. */ ++ unsigned hardfp = 0; ++ ++ Elf_Scn *scn; ++ Elf_Data *data; ++ GElf_Shdr shdr; ++ if (elf_get_section_type(lte, SHT_ARM_ATTRIBUTES, &scn, &shdr) < 0 ++ || (scn != NULL && (data = elf_loaddata(scn, &shdr)) == NULL)) { ++ fprintf(stderr, ++ "Error when obtaining ARM attribute section: %s\n", ++ elf_errmsg(-1)); ++ goto done; ++ ++ } else if (scn != NULL && data != NULL) { ++ GElf_Xword offset = 0; ++ uint8_t version; ++ if (elf_read_next_u8(data, &offset, &version) < 0) { ++ goto done; ++ } else if (version != 'A') { ++ fprintf(stderr, "Unsupported ARM attribute section " ++ "version %d ('%c').\n", version, version); ++ goto done; ++ } ++ ++ do { ++ const char signature[] = "aeabi"; ++ /* N.B. LEN is including the length field ++ * itself. */ ++ uint32_t sec_len; ++ if (elf_read_u32(data, offset, &sec_len) < 0 ++ || !elf_can_read_next(data, offset, sec_len)) { ++ goto done; ++ } ++ const GElf_Xword next_offset = offset + sec_len; ++ offset += 4; ++ ++ if (sec_len < 4 + sizeof signature ++ || strcmp(signature, data->d_buf + offset) != 0) ++ goto skip; ++ offset += sizeof signature; ++ ++ const GElf_Xword offset0 = offset; ++ uint64_t tag; ++ uint32_t sub_len; ++ if (elf_read_next_uleb128(data, &offset, &tag) < 0 ++ || elf_read_next_u32(data, &offset, &sub_len) < 0 ++ || !elf_can_read_next(data, offset0, sub_len)) ++ goto done; ++ ++ if (tag != 1) ++ /* IHI0045D_ABI_addenda: "section and ++ * symbol attributes are deprecated ++ * [...] consumers are permitted to ++ * ignore them." */ ++ goto skip; ++ ++ while (offset < offset0 + sub_len) { ++ if (elf_read_next_uleb128(data, ++ &offset, &tag) < 0) ++ goto done; ++ ++ switch (tag) { ++ uint64_t v; ++ case 6: /* Tag_CPU_arch */ ++ case 7: /* Tag_CPU_arch_profile */ ++ case 8: /* Tag_ARM_ISA_use */ ++ case 9: /* Tag_THUMB_ISA_use */ ++ case 10: /* Tag_FP_arch */ ++ case 11: /* Tag_WMMX_arch */ ++ case 12: /* Tag_Advanced_SIMD_arch */ ++ case 13: /* Tag_PCS_config */ ++ case 14: /* Tag_ABI_PCS_R9_use */ ++ case 15: /* Tag_ABI_PCS_RW_data */ ++ case 16: /* Tag_ABI_PCS_RO_data */ ++ case 17: /* Tag_ABI_PCS_GOT_use */ ++ case 18: /* Tag_ABI_PCS_wchar_t */ ++ case 19: /* Tag_ABI_FP_rounding */ ++ case 20: /* Tag_ABI_FP_denormal */ ++ case 21: /* Tag_ABI_FP_exceptions */ ++ case 22: /* Tag_ABI_FP_user_exceptions */ ++ case 23: /* Tag_ABI_FP_number_model */ ++ case 24: /* Tag_ABI_align_needed */ ++ case 25: /* Tag_ABI_align_preserved */ ++ case 26: /* Tag_ABI_enum_size */ ++ case 27: /* Tag_ABI_HardFP_use */ ++ case 28: /* Tag_ABI_VFP_args */ ++ case 29: /* Tag_ABI_WMMX_args */ ++ case 30: /* Tag_ABI_optimization_goals */ ++ case 31: /* Tag_ABI_FP_optimization_goals */ ++ case 32: /* Tag_compatibility */ ++ case 34: /* Tag_CPU_unaligned_access */ ++ case 36: /* Tag_FP_HP_extension */ ++ case 38: /* Tag_ABI_FP_16bit_format */ ++ case 42: /* Tag_MPextension_use */ ++ case 70: /* Tag_MPextension_use as well */ ++ case 44: /* Tag_DIV_use */ ++ case 64: /* Tag_nodefaults */ ++ case 66: /* Tag_T2EE_use */ ++ case 68: /* Tag_Virtualization_use */ ++ uleb128: ++ if (elf_read_next_uleb128 ++ (data, &offset, &v) < 0) ++ goto done; ++ if (tag == 28) ++ hardfp = get_hardfp(v); ++ if (tag != 32) ++ continue; ++ ++ /* Tag 32 has two arguments, ++ * fall through. */ ++ ++ case 4: /* Tag_CPU_raw_name */ ++ case 5: /* Tag_CPU_name */ ++ case 65: /* Tag_also_compatible_with */ ++ case 67: /* Tag_conformance */ ++ ntbs: ++ offset += strlen(data->d_buf ++ + offset) + 1; ++ continue; ++ } ++ ++ /* Handle unknown tags in a generic ++ * manner, if possible. */ ++ if (tag <= 32) { ++ fprintf(stderr, ++ "Unknown tag %lld " ++ "at offset %#llx " ++ "of ARM attribute section.", ++ tag, offset); ++ goto skip; ++ } else if (tag % 2 == 0) { ++ goto uleb128; ++ } else { ++ goto ntbs; ++ } ++ } ++ ++ skip: ++ offset = next_offset; ++ ++ } while (elf_can_read_next(data, offset, 1)); ++ ++ } ++ ++done: ++ lib->arch.hardfp = hardfp; ++ return 0; ++} ++ ++void ++arch_elf_destroy(struct ltelf *lte) ++{ ++} ++ ++static int + arch_plt_entry_has_stub(struct ltelf *lte, size_t off) { +- uint16_t op = *(uint16_t *)((char *)lte->relplt->d_buf + off); ++ char *buf = (char *) lte->arch.jmprel_data->d_buf; ++ uint16_t op = *(uint16_t *) (buf + off); + return op == 0x4778; + } + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { +- size_t start = lte->relplt->d_size + 12; ++ size_t start = lte->arch.jmprel_data->d_size + 12; + size_t off = start + 20, i; + for (i = 0; i < ndx; i++) + off += arch_plt_entry_has_stub(lte, off) ? 16 : 12; +@@ -47,3 +233,21 @@ sym2addr(struct process *proc, struct library_symbol *sym) + { + return sym->enter_addr; + } ++ ++int ++arch_library_init(struct library *lib) ++{ ++ return 0; ++} ++ ++void ++arch_library_destroy(struct library *lib) ++{ ++} ++ ++int ++arch_library_clone(struct library *retp, struct library *lib) ++{ ++ retp->arch = lib->arch; ++ return 0; ++} +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 5e3ffe1..3ec1397 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -402,38 +402,6 @@ get_glink_vma(struct ltelf *lte, GElf_Addr ppcgot, Elf_Data *plt_data) + } + + static int +-load_dynamic_entry(struct ltelf *lte, int tag, GElf_Addr *valuep) +-{ +- Elf_Scn *scn; +- GElf_Shdr shdr; +- if (elf_get_section_type(lte, SHT_DYNAMIC, &scn, &shdr) < 0 +- || scn == NULL) { +- fail: +- fprintf(stderr, "Couldn't get SHT_DYNAMIC: %s\n", +- elf_errmsg(-1)); +- return -1; +- } +- +- Elf_Data *data = elf_loaddata(scn, &shdr); +- if (data == NULL) +- goto fail; +- +- size_t j; +- for (j = 0; j < shdr.sh_size / shdr.sh_entsize; ++j) { +- GElf_Dyn dyn; +- if (gelf_getdyn(data, j, &dyn) == NULL) +- goto fail; +- +- if(dyn.d_tag == tag) { +- *valuep = dyn.d_un.d_ptr; +- return 0; +- } +- } +- +- return -1; +-} +- +-static int + nonzero_data(Elf_Data *data) + { + /* We are not supposed to get here if there's no PLT. */ +@@ -488,8 +456,8 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + Elf_Scn *rela_sec; + GElf_Shdr rela_shdr; + if ((lte->ehdr.e_machine == EM_PPC64 || lte->arch.secure_plt) +- && load_dynamic_entry(lte, DT_RELA, &rela) == 0 +- && load_dynamic_entry(lte, DT_RELASZ, &relasz) == 0 ++ && elf_load_dynamic_entry(lte, DT_RELA, &rela) == 0 ++ && elf_load_dynamic_entry(lte, DT_RELASZ, &relasz) == 0 + && elf_get_section_covering(lte, rela, &rela_sec, &rela_shdr) == 0 + && rela_sec != NULL) { + +@@ -509,7 +477,7 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + + if (lte->ehdr.e_machine == EM_PPC && lte->arch.secure_plt) { + GElf_Addr ppcgot; +- if (load_dynamic_entry(lte, DT_PPC_GOT, &ppcgot) < 0) { ++ if (elf_load_dynamic_entry(lte, DT_PPC_GOT, &ppcgot) < 0) { + fprintf(stderr, "couldn't find DT_PPC_GOT\n"); + return -1; + } +@@ -522,7 +490,8 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + + } else if (lte->ehdr.e_machine == EM_PPC64) { + GElf_Addr glink_vma; +- if (load_dynamic_entry(lte, DT_PPC64_GLINK, &glink_vma) < 0) { ++ if (elf_load_dynamic_entry(lte, DT_PPC64_GLINK, ++ &glink_vma) < 0) { + fprintf(stderr, "couldn't find DT_PPC64_GLINK\n"); + return -1; + } +@@ -532,8 +501,8 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + + } else { + /* By exhaustion--PPC32 BSS. */ +- if (load_dynamic_entry(lte, DT_PLTGOT, +- &lib->arch.pltgot_addr) < 0) { ++ if (elf_load_dynamic_entry(lte, DT_PLTGOT, ++ &lib->arch.pltgot_addr) < 0) { + fprintf(stderr, "couldn't find DT_PLTGOT\n"); + return -1; + } diff --git a/ltrace.spec b/ltrace.spec index 0b090ad..f2c68ff 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -14,6 +14,9 @@ BuildRequires: libselinux-devel # https://alioth.debian.org/frs/?group_id=30892 Source: ltrace-%{version}.tar.bz2 +# Merge of several upstream commits that fixes compilation on ARM. +Patch0: ltrace-0.7.91-arm.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -26,6 +29,7 @@ execution of processes. %prep %setup -q -n %{name}-%{version} +%patch0 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} From 8c4195b4266096f76b29ca0b036ea71d7d5e9777 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 5 Nov 2013 05:10:01 +0100 Subject: [PATCH 004/100] Guard the test suite run with a timeout --- ltrace.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index f2c68ff..657be06 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -42,7 +42,7 @@ make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} install # koji for some reason. Disable it, but have it handy. %check echo ====================TESTING========================= -make check ||: +timeout 180 make check ||: echo ====================TESTING END===================== %files From fbf52e61305ce31efe2ef5b79e25a758abfe270b Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 5 Nov 2013 14:08:24 +0100 Subject: [PATCH 005/100] Drop unused patches --- ...e-0.7.2-s390-set_instruction_pointer.patch | 94 ------------------- ltrace-0.7.2-unused-typedef.patch | 49 ---------- 2 files changed, 143 deletions(-) delete mode 100644 ltrace-0.7.2-s390-set_instruction_pointer.patch delete mode 100644 ltrace-0.7.2-unused-typedef.patch diff --git a/ltrace-0.7.2-s390-set_instruction_pointer.patch b/ltrace-0.7.2-s390-set_instruction_pointer.patch deleted file mode 100644 index c80bcf9..0000000 --- a/ltrace-0.7.2-s390-set_instruction_pointer.patch +++ /dev/null @@ -1,94 +0,0 @@ -From cb58fdb5a072ad70087a07f67d0c094ff77ca4b7 Mon Sep 17 00:00:00 2001 -From: Petr Machata -Date: Tue, 26 Mar 2013 13:26:23 +0100 -Subject: [PATCH] s390 set_instruction_pointer: Set highest bit in 31-bit tracer - -- The highest bit is used to distinguish between 24-bit and 31-bit - addressing modes. Up until about 3.1, Linux did this automatically, - but stopped doing so with the following commit: - - https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=d4e81b35b882d96f059afdb0f98e5b6025973b09 ---- - sysdeps/linux-gnu/s390/regs.c | 3 +++ - 1 files changed, 3 insertions(+), 0 deletions(-) - -diff --git a/sysdeps/linux-gnu/s390/regs.c b/sysdeps/linux-gnu/s390/regs.c -index bb16c61..656654a 100644 ---- a/sysdeps/linux-gnu/s390/regs.c -+++ b/sysdeps/linux-gnu/s390/regs.c -@@ -46,7 +46,7 @@ - #define PSW_MASK 0x7fffffff - #endif - --void * -+arch_addr_t - get_instruction_pointer(struct process *proc) - { - long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_PSWADDR, 0) & PSW_MASK; -@@ -54,20 +54,22 @@ get_instruction_pointer(struct process *proc) - if (proc->mask_32bit) - ret &= PSW_MASK31; - #endif -- return (void *)ret; -+ /* XXX double cast. */ -+ return (arch_addr_t)ret; - } - - void --set_instruction_pointer(struct process *proc, void *addr) -+set_instruction_pointer(struct process *proc, arch_addr_t addr) - { - #ifdef __s390x__ - if (proc->mask_32bit) -- addr = (void *)((long)addr & PSW_MASK31); -+ /* XXX double cast. */ -+ addr = (arch_addr_t)((uintptr_t)addr & PSW_MASK31); - #endif - ptrace(PTRACE_POKEUSER, proc->pid, PT_PSWADDR, addr); - } - --void * -+arch_addr_t - get_stack_pointer(struct process *proc) - { - long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR15, 0) & PSW_MASK; -@@ -75,16 +77,18 @@ get_stack_pointer(struct process *proc) - if (proc->mask_32bit) - ret &= PSW_MASK31; - #endif -- return (void *)ret; -+ /* XXX double cast. */ -+ return (arch_addr_t)ret; - } - --void * --get_return_addr(struct process *proc, void *stack_pointer) -+arch_addr_t -+get_return_addr(struct process *proc, arch_addr_t stack_pointer) - { - long ret = ptrace(PTRACE_PEEKUSER, proc->pid, PT_GPR14, 0) & PSW_MASK; - #ifdef __s390x__ - if (proc->mask_32bit) - ret &= PSW_MASK31; - #endif -- return (void *)ret; -+ /* XXX double cast. */ -+ return (arch_addr_t)ret; - } -diff --git a/sysdeps/linux-gnu/s390/regs.c b/sysdeps/linux-gnu/s390/regs.c -index 656654a..51410d7 100644 ---- a/sysdeps/linux-gnu/s390/regs.c -+++ b/sysdeps/linux-gnu/s390/regs.c -@@ -65,6 +65,9 @@ set_instruction_pointer(struct process *proc, arch_addr_t addr) - if (proc->mask_32bit) - /* XXX double cast. */ - addr = (arch_addr_t)((uintptr_t)addr & PSW_MASK31); -+#else -+ /* XXX double cast. */ -+ addr = (arch_addr_t)((uintptr_t)addr | ~PSW_MASK); - #endif - ptrace(PTRACE_POKEUSER, proc->pid, PT_PSWADDR, addr); - } --- -1.7.6.5 - diff --git a/ltrace-0.7.2-unused-typedef.patch b/ltrace-0.7.2-unused-typedef.patch deleted file mode 100644 index 8f3c0ec..0000000 --- a/ltrace-0.7.2-unused-typedef.patch +++ /dev/null @@ -1,49 +0,0 @@ -diff --git a/value.c b/value.c -index d18db17..b98298e 100644 ---- a/value.c -+++ b/value.c -@@ -1,6 +1,6 @@ - /* - * This file is part of ltrace. -- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc. -+ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as -@@ -282,9 +282,9 @@ value_init_deref(struct value *ret_val, struct value *valp) - if (value_extract_word(valp, &l, NULL) < 0) - return -1; - -- /* We need "long" to be long enough to hold platform -+ /* We need "long" to be long enough to hold target - * pointers. */ -- typedef char assert__long_enough_long[-(sizeof(l) < sizeof(void *))]; -+ assert(sizeof(l) >= sizeof(arch_addr_t)); - - value_common_init(ret_val, valp->inferior, valp, - valp->type->u.ptr_info.info, 0); -diff --git a/lens_default.c b/lens_default.c -index ed3d0e1..5d00814 100644 ---- a/lens_default.c -+++ b/lens_default.c -@@ -1,6 +1,6 @@ - /* - * This file is part of ltrace. -- * Copyright (C) 2011,2012 Petr Machata, Red Hat Inc. -+ * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. - * Copyright (C) 1998,2004,2007,2008,2009 Juan Cespedes - * Copyright (C) 2006 Ian Wienand - * Copyright (C) 2006 Steve Fink -@@ -342,9 +342,9 @@ format_array(FILE *stream, struct value *value, struct value_dict *arguments, - struct expr_node *length, size_t maxlen, int before, - const char *open, const char *close, const char *delim) - { -- /* We need "long" to be long enough to cover the whole address -- * space. */ -- typedef char assert__long_enough_long[-(sizeof(long) < sizeof(void *))]; -+ /* We need "long" to be long enough to cover the whole target -+ * address space. */ -+ assert(sizeof(long) >= sizeof(arch_addr_t)); - long l; - if (expr_eval_word(length, value, arguments, &l) < 0) - return -1; From d0b91762a76d57a3c7d8543c1b51bab43b4eb663 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 21 Nov 2013 22:43:59 +0100 Subject: [PATCH 006/100] Fix inclusion of unfinished functions in summary mode --- ltrace-0.7.91-account_execl.patch | 834 ++++++++++++++++++++++++++++++ ltrace.spec | 11 +- 2 files changed, 844 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-account_execl.patch diff --git a/ltrace-0.7.91-account_execl.patch b/ltrace-0.7.91-account_execl.patch new file mode 100644 index 0000000..2aa4ba0 --- /dev/null +++ b/ltrace-0.7.91-account_execl.patch @@ -0,0 +1,834 @@ +From 0cf4ab66e9927e101a51dd9fa9adc6c8dc56b5e7 Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Thu, 21 Nov 2013 20:25:53 +0100 +Subject: [PATCH] Consider exec and exit events an end of outstanding calls + +- This cleans up a lot of stuff. The actual substance is addition of + account_current_callstack in handle_event.c (which however uses + those cleaned-up interfaces). + +- trace-exec.exp was extended to check that the exec syscall can be + seen in -c output. That's one of the symptoms of what this fixes. +--- + Makefile.am | 8 +- + common.h | 2 - + forward.h | 1 + + handle_event.c | 225 ++++++++++++++++++++------------- + libltrace.c | 5 +- + options.h | 8 +- + output.c | 86 +++---------- + output.h | 5 +- + proc.h | 2 +- + summary.c | 89 +++++++++++++- + summary.h | 35 +++++ + testsuite/ltrace.minor/trace-exec.exp | 16 ++- + 12 files changed, 299 insertions(+), 183 deletions(-) + create mode 100644 summary.h + +diff --git a/Makefile.am b/Makefile.am +index d711aec..efcf18a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -54,10 +54,10 @@ ltrace_LDADD = \ + + noinst_HEADERS = bits.h backend.h breakpoint.h common.h debug.h \ + defs.h demangle.h dict.h forward.h ltrace-elf.h ltrace.h \ +- options.h output.h proc.h read_config_file.h library.h \ +- filter.h glob.h vect.h type.h value.h value_dict.h callback.h \ +- expr.h fetch.h vect.h param.h printf.h zero.h lens.h \ +- lens_default.h lens_enum.h memstream.h prototype.h ++ options.h output.h proc.h read_config_file.h summary.h \ ++ library.h filter.h glob.h vect.h type.h value.h value_dict.h \ ++ callback.h expr.h fetch.h vect.h param.h printf.h zero.h \ ++ lens.h lens_default.h lens_enum.h memstream.h prototype.h + + dist_man1_MANS = ltrace.1 + dist_man5_MANS = ltrace.conf.5 +diff --git a/common.h b/common.h +index a53c5db..7259ba4 100644 +--- a/common.h ++++ b/common.h +@@ -54,8 +54,6 @@ extern void handle_event(Event * event); + + extern pid_t execute_program(const char * command, char ** argv); + +-extern void show_summary(void); +- + struct breakpoint; + struct library_symbol; + +diff --git a/forward.h b/forward.h +index 8641213..58d8f05 100644 +--- a/forward.h ++++ b/forward.h +@@ -34,6 +34,7 @@ struct param_enum; + struct process; + struct protolib; + struct prototype; ++struct timedelta; + struct value; + struct value_dict; + struct vect; +diff --git a/handle_event.c b/handle_event.c +index 9ed62a2..6fa7e98 100644 +--- a/handle_event.c ++++ b/handle_event.c +@@ -32,7 +32,6 @@ + #include + #include + #include +-#include + #include + + #include "backend.h" +@@ -41,8 +40,9 @@ + #include "fetch.h" + #include "library.h" + #include "proc.h" +-#include "value_dict.h" + #include "prototype.h" ++#include "summary.h" ++#include "value_dict.h" + + static void handle_signal(Event *event); + static void handle_exit(Event *event); +@@ -419,32 +419,11 @@ handle_signal(Event *event) { + continue_after_signal(event->proc->pid, event->e_un.signum); + } + +-static void +-handle_exit(Event *event) { +- debug(DEBUG_FUNCTION, "handle_exit(pid=%d, status=%d)", event->proc->pid, event->e_un.ret_val); +- if (event->proc->state != STATE_IGNORED) { +- output_line(event->proc, "+++ exited (status %d) +++", +- event->e_un.ret_val); +- } +- remove_process(event->proc); +-} +- +-static void +-handle_exit_signal(Event *event) { +- debug(DEBUG_FUNCTION, "handle_exit_signal(pid=%d, signum=%d)", event->proc->pid, event->e_un.signum); +- if (event->proc->state != STATE_IGNORED) { +- output_line(event->proc, "+++ killed by %s +++", +- shortsignal(event->proc, event->e_un.signum)); +- } +- remove_process(event->proc); +-} +- +-static void +-output_syscall(struct process *proc, const char *name, enum tof tof, +- void (*output)(enum tof, struct process *, +- struct library_symbol *)) ++static int ++init_syscall_symbol(struct library_symbol *libsym, const char *name) + { + static struct library syscall_lib; ++ + if (syscall_lib.protolib == NULL) { + struct protolib *protolib + = protolib_cache_load(&g_protocache, "syscalls", 0, 1); +@@ -475,10 +454,91 @@ output_syscall(struct process *proc, const char *name, enum tof tof, + syscall_lib.protolib = protolib; + } + ++ if (library_symbol_init(libsym, 0, name, 0, LS_TOPLT_NONE) < 0) ++ return -1; ++ ++ libsym->lib = &syscall_lib; ++ return 0; ++} ++ ++/* Account the unfinished functions on the call stack. */ ++static void ++account_current_callstack(struct process *proc) ++{ ++ if (! options.summary) ++ return; ++ ++ struct timedelta spent[proc->callstack_depth]; ++ ++ size_t i; ++ for (i = 0; i < proc->callstack_depth; ++i) { ++ struct callstack_element *elem = &proc->callstack[i]; ++ spent[i] = calc_time_spent(elem->enter_time); ++ } ++ ++ for (i = 0; i < proc->callstack_depth; ++i) { ++ struct callstack_element *elem = &proc->callstack[i]; ++ struct library_symbol syscall, *libsym = NULL; ++ if (elem->is_syscall) { ++ const char *name = sysname(proc, elem->c_un.syscall); ++ if (init_syscall_symbol(&syscall, name) >= 0) ++ libsym = &syscall; ++ ++ } else { ++ libsym = elem->c_un.libfunc; ++ } ++ ++ if (libsym != NULL) { ++ summary_account_call(libsym, spent[i]); ++ ++ if (elem->is_syscall) ++ library_symbol_destroy(&syscall); ++ } ++ } ++} ++ ++static void ++handle_exit(Event *event) { ++ debug(DEBUG_FUNCTION, "handle_exit(pid=%d, status=%d)", event->proc->pid, event->e_un.ret_val); ++ if (event->proc->state != STATE_IGNORED) { ++ output_line(event->proc, "+++ exited (status %d) +++", ++ event->e_un.ret_val); ++ } ++ ++ account_current_callstack(event->proc); ++ remove_process(event->proc); ++} ++ ++static void ++handle_exit_signal(Event *event) { ++ debug(DEBUG_FUNCTION, "handle_exit_signal(pid=%d, signum=%d)", event->proc->pid, event->e_un.signum); ++ if (event->proc->state != STATE_IGNORED) { ++ output_line(event->proc, "+++ killed by %s +++", ++ shortsignal(event->proc, event->e_un.signum)); ++ } ++ ++ account_current_callstack(event->proc); ++ remove_process(event->proc); ++} ++ ++static void ++output_syscall(struct process *proc, const char *name, enum tof tof, ++ bool left, struct timedelta *spent) ++{ ++ if (left) ++ assert(spent == NULL); ++ + struct library_symbol syscall; +- if (library_symbol_init(&syscall, 0, name, 0, LS_TOPLT_NONE) >= 0) { +- syscall.lib = &syscall_lib; +- (*output)(tof, proc, &syscall); ++ if (init_syscall_symbol(&syscall, name) >= 0) { ++ if (left) { ++ if (! options.summary) ++ output_left(tof, proc, &syscall); ++ } else if (options.summary) { ++ summary_account_call(&syscall, *spent); ++ } else { ++ output_right(tof, proc, &syscall, spent); ++ } ++ + library_symbol_destroy(&syscall); + } + } +@@ -486,17 +546,19 @@ output_syscall(struct process *proc, const char *name, enum tof tof, + static void + output_syscall_left(struct process *proc, const char *name) + { +- output_syscall(proc, name, LT_TOF_SYSCALL, &output_left); ++ output_syscall(proc, name, LT_TOF_SYSCALL, true, NULL); + } + + static void +-output_syscall_right(struct process *proc, const char *name) ++output_syscall_right(struct process *proc, const char *name, ++ struct timedelta *spent) + { +- output_syscall(proc, name, LT_TOF_SYSCALLR, &output_right); ++ output_syscall(proc, name, LT_TOF_SYSCALLR, false, spent); + } + + static void +-handle_syscall(Event *event) { ++handle_syscall(Event *event) ++{ + debug(DEBUG_FUNCTION, "handle_syscall(pid=%d, sysnum=%d)", event->proc->pid, event->e_un.sysnum); + if (event->proc->state != STATE_IGNORED) { + callstack_push_syscall(event->proc, event->e_un.sysnum); +@@ -526,6 +588,8 @@ handle_exec(Event *event) + } + output_line(proc, "--- Called exec() ---"); + ++ account_current_callstack(proc); ++ + if (process_exec(proc) < 0) { + fprintf(stderr, + "couldn't reinitialize process %d after exec\n", pid); +@@ -549,74 +613,58 @@ handle_arch_syscall(Event *event) { + continue_process(event->proc->pid); + } + +-struct timeval current_time_spent; +- + static void +-calc_time_spent(struct process *proc) ++handle_x_sysret(Event *event, char *(*name_cb)(struct process *, int)) + { +- struct timeval tv; +- struct timezone tz; +- struct timeval diff; +- struct callstack_element *elem; +- +- debug(DEBUG_FUNCTION, "calc_time_spent(pid=%d)", proc->pid); +- elem = &proc->callstack[proc->callstack_depth - 1]; +- +- gettimeofday(&tv, &tz); ++ debug(DEBUG_FUNCTION, "handle_x_sysret(pid=%d, sysnum=%d)", ++ event->proc->pid, event->e_un.sysnum); + +- diff.tv_sec = tv.tv_sec - elem->time_spent.tv_sec; +- if (tv.tv_usec >= elem->time_spent.tv_usec) { +- diff.tv_usec = tv.tv_usec - elem->time_spent.tv_usec; +- } else { +- diff.tv_sec--; +- diff.tv_usec = 1000000 + tv.tv_usec - elem->time_spent.tv_usec; +- } +- current_time_spent = diff; +-} ++ unsigned d = event->proc->callstack_depth; ++ assert(d > 0); ++ struct callstack_element *elem = &event->proc->callstack[d - 1]; ++ assert(elem->is_syscall); + +-static void +-handle_sysret(Event *event) { +- debug(DEBUG_FUNCTION, "handle_sysret(pid=%d, sysnum=%d)", event->proc->pid, event->e_un.sysnum); + if (event->proc->state != STATE_IGNORED) { +- if (opt_T || options.summary) { +- calc_time_spent(event->proc); +- } ++ struct timedelta spent = calc_time_spent(elem->enter_time); + if (options.syscalls) + output_syscall_right(event->proc, +- sysname(event->proc, +- event->e_un.sysnum)); ++ name_cb(event->proc, ++ event->e_un.sysnum), ++ &spent); + +- assert(event->proc->callstack_depth > 0); +- unsigned d = event->proc->callstack_depth - 1; +- assert(event->proc->callstack[d].is_syscall); + callstack_pop(event->proc); + } + continue_after_syscall(event->proc, event->e_un.sysnum, 1); + } + + static void +-handle_arch_sysret(Event *event) { +- debug(DEBUG_FUNCTION, "handle_arch_sysret(pid=%d, sysnum=%d)", event->proc->pid, event->e_un.sysnum); +- if (event->proc->state != STATE_IGNORED) { +- if (opt_T || options.summary) { +- calc_time_spent(event->proc); +- } +- if (options.syscalls) +- output_syscall_right(event->proc, +- arch_sysname(event->proc, +- event->e_un.sysnum)); +- callstack_pop(event->proc); +- } +- continue_process(event->proc->pid); ++handle_sysret(Event *event) ++{ ++ handle_x_sysret(event, &sysname); ++} ++ ++static void ++handle_arch_sysret(Event *event) ++{ ++ handle_x_sysret(event, &arch_sysname); + } + + static void + output_right_tos(struct process *proc) + { + size_t d = proc->callstack_depth; ++ assert(d > 0); + struct callstack_element *elem = &proc->callstack[d - 1]; +- if (proc->state != STATE_IGNORED) +- output_right(LT_TOF_FUNCTIONR, proc, elem->c_un.libfunc); ++ assert(! elem->is_syscall); ++ ++ if (proc->state != STATE_IGNORED) { ++ struct timedelta spent = calc_time_spent(elem->enter_time); ++ if (options.summary) ++ summary_account_call(elem->c_un.libfunc, spent); ++ else ++ output_right(LT_TOF_FUNCTIONR, proc, elem->c_un.libfunc, ++ &spent); ++ } + } + + #ifndef ARCH_HAVE_SYMBOL_RET +@@ -645,14 +693,8 @@ handle_breakpoint(Event *event) + + for (i = event->proc->callstack_depth - 1; i >= 0; i--) { + if (brk_addr == event->proc->callstack[i].return_addr) { +- for (j = event->proc->callstack_depth - 1; j > i; j--) { ++ for (j = event->proc->callstack_depth - 1; j > i; j--) + callstack_pop(event->proc); +- } +- if (event->proc->state != STATE_IGNORED) { +- if (opt_T || options.summary) { +- calc_time_spent(event->proc); +- } +- } + + struct library_symbol *libsym = + event->proc->callstack[i].c_un.libfunc; +@@ -705,11 +747,14 @@ handle_breakpoint(Event *event) + /* breakpoint_on_hit may delete its own breakpoint, so we have + * to look it up again. */ + if ((sbp = address2bpstruct(leader, brk_addr)) != NULL) { ++ + if (event->proc->state != STATE_IGNORED + && sbp->libsym != NULL) { + event->proc->stack_pointer = get_stack_pointer(event->proc); + callstack_push_symfunc(event->proc, sbp); +- output_left(LT_TOF_FUNCTION, event->proc, sbp->libsym); ++ if (! options.summary) ++ output_left(LT_TOF_FUNCTION, event->proc, ++ sbp->libsym); + } + + breakpoint_on_continue(sbp, event->proc); +@@ -743,7 +788,7 @@ callstack_push_syscall(struct process *proc, int sysnum) + proc->callstack_depth++; + if (opt_T || options.summary) { + struct timezone tz; +- gettimeofday(&elem->time_spent, &tz); ++ gettimeofday(&elem->enter_time, &tz); + } + } + +@@ -781,7 +826,7 @@ callstack_push_symfunc(struct process *proc, struct breakpoint *bp) + + if (opt_T || options.summary) { + struct timezone tz; +- gettimeofday(&elem->time_spent, &tz); ++ gettimeofday(&elem->enter_time, &tz); + } + } + +diff --git a/libltrace.c b/libltrace.c +index 2d910a1..0112c9f 100644 +--- a/libltrace.c ++++ b/libltrace.c +@@ -32,11 +32,12 @@ + #include + #include + ++#include "backend.h" + #include "common.h" + #include "proc.h" +-#include "read_config_file.h" +-#include "backend.h" + #include "prototype.h" ++#include "read_config_file.h" ++#include "summary.h" + + char *command = NULL; + +diff --git a/options.h b/options.h +index 6c28ed9..d0df3a7 100644 +--- a/options.h ++++ b/options.h +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2012,2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2009,2010 Joe Damato + * Copyright (C) 1998,2002,2008 Juan Cespedes + * Copyright (C) 2006 Ian Wienand +@@ -103,12 +103,6 @@ int parse_colon_separated_list(const char *paths, struct vect *vec); + /* Vector of struct opt_F_t. */ + extern struct vect opt_F; + +-struct opt_c_struct { +- int count; +- struct timeval tv; +-}; +-extern struct dict *dict_opt_c; +- + extern char **process_options(int argc, char **argv); + + #endif /* _OPTIONS_H_ */ +diff --git a/output.c b/output.c +index edf4522..82b6a5e 100644 +--- a/output.c ++++ b/output.c +@@ -44,16 +44,12 @@ + #include "param.h" + #include "proc.h" + #include "prototype.h" ++#include "summary.h" + #include "type.h" + #include "value.h" + #include "value_dict.h" + +-/* TODO FIXME XXX: include in common.h: */ +-extern struct timeval current_time_spent; +- +-struct dict *dict_opt_c = NULL; +- +-static struct process *current_proc = 0; ++static struct process *current_proc = NULL; + static size_t current_depth = 0; + static int current_column = 0; + +@@ -498,9 +494,8 @@ void + output_left(enum tof type, struct process *proc, + struct library_symbol *libsym) + { +- if (options.summary) { +- return; +- } ++ assert(! options.summary); ++ + if (current_proc) { + fprintf(options.output, " \n"); + current_column = 0; +@@ -572,70 +567,21 @@ output_left(enum tof type, struct process *proc, + stel->out.need_delim = need_delim; + } + +-static void +-free_stringp_cb(const char **stringp, void *data) +-{ +- free((char *)*stringp); +-} +- + void +-output_right(enum tof type, struct process *proc, struct library_symbol *libsym) ++output_right(enum tof type, struct process *proc, struct library_symbol *libsym, ++ struct timedelta *spent) + { ++ assert(! options.summary); ++ + struct prototype *func = lookup_symbol_prototype(proc, libsym); + if (func == NULL) + return; + +-again: +- if (options.summary) { +- if (dict_opt_c == NULL) { +- dict_opt_c = malloc(sizeof(*dict_opt_c)); +- if (dict_opt_c == NULL) { +- oom: +- fprintf(stderr, +- "Can't allocate memory for " +- "keeping track of -c.\n"); +- free(dict_opt_c); +- options.summary = 0; +- goto again; +- } +- DICT_INIT(dict_opt_c, char *, struct opt_c_struct, +- dict_hash_string, dict_eq_string, NULL); +- } +- +- struct opt_c_struct *st +- = DICT_FIND_REF(dict_opt_c, &libsym->name, +- struct opt_c_struct); +- if (st == NULL) { +- const char *na = strdup(libsym->name); +- struct opt_c_struct new_st = {.count = 0, .tv = {0, 0}}; +- if (na == NULL +- || DICT_INSERT(dict_opt_c, &na, &new_st) < 0) { +- free((char *)na); +- DICT_DESTROY(dict_opt_c, const char *, +- struct opt_c_struct, +- free_stringp_cb, NULL, NULL); +- goto oom; +- } +- st = DICT_FIND_REF(dict_opt_c, &libsym->name, +- struct opt_c_struct); +- assert(st != NULL); +- } +- +- if (st->tv.tv_usec + current_time_spent.tv_usec > 1000000) { +- st->tv.tv_usec += current_time_spent.tv_usec - 1000000; +- st->tv.tv_sec++; +- } else { +- st->tv.tv_usec += current_time_spent.tv_usec; +- } +- st->count++; +- st->tv.tv_sec += current_time_spent.tv_sec; +- return; +- } +- +- if (current_proc && (current_proc != proc || +- current_depth != proc->callstack_depth)) { ++ if (current_proc != NULL ++ && (current_proc != proc ++ || current_depth != proc->callstack_depth)) { + fprintf(options.output, " \n"); +- current_proc = 0; ++ current_proc = NULL; + } + if (current_proc != proc) { + begin_of_line(proc, type == LT_TOF_FUNCTIONR, 1); +@@ -689,10 +635,12 @@ again: + value_destroy(&retval); + + if (opt_T) { ++ assert(spent != NULL); + fprintf(options.output, " <%lu.%06d>", +- (unsigned long)current_time_spent.tv_sec, +- (int)current_time_spent.tv_usec); ++ (unsigned long) spent->tm.tv_sec, ++ (int) spent->tm.tv_usec); + } ++ + fprintf(options.output, "\n"); + + #if defined(HAVE_LIBUNWIND) +@@ -746,7 +694,7 @@ again: + } + #endif /* defined(HAVE_LIBUNWIND) */ + +- current_proc = 0; ++ current_proc = NULL; + current_column = 0; + } + +diff --git a/output.h b/output.h +index b9f0518..2e74d61 100644 +--- a/output.h ++++ b/output.h +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2011, 2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2011, 2012, 2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2009 Juan Cespedes + * + * This program is free software; you can redistribute it and/or +@@ -28,7 +28,8 @@ void output_line(struct process *proc, const char *fmt, ...); + void output_left(enum tof type, struct process *proc, + struct library_symbol *libsym); + void output_right(enum tof type, struct process *proc, +- struct library_symbol *libsym); ++ struct library_symbol *libsym, ++ struct timedelta *spent); + + /* This function is for emitting lists of comma-separated strings. + * +diff --git a/proc.h b/proc.h +index e8032fa..64f8fe2 100644 +--- a/proc.h ++++ b/proc.h +@@ -66,7 +66,7 @@ struct callstack_element { + } c_un; + int is_syscall; + arch_addr_t return_addr; +- struct timeval time_spent; ++ struct timeval enter_time; + struct fetch_context *fetch_context; + struct value_dict *arguments; + struct output_state out; +diff --git a/summary.c b/summary.c +index 9e22086..9103f71 100644 +--- a/summary.c ++++ b/summary.c +@@ -22,11 +22,15 @@ + + #include "config.h" + ++#include + #include + #include +-#include ++#include + +-#include "common.h" ++#include "summary.h" ++#include "dict.h" ++#include "library.h" ++#include "options.h" + + struct entry_st { + const char *name; +@@ -40,6 +44,32 @@ struct fill_struct_data { + unsigned long tot_usecs; + }; + ++struct opt_c_struct { ++ int count; ++ struct timeval tv; ++}; ++ ++static struct dict *dict_opt_c; ++ ++struct timedelta ++calc_time_spent(struct timeval start) ++{ ++ struct timeval tv; ++ gettimeofday(&tv, NULL); ++ ++ struct timeval diff; ++ diff.tv_sec = tv.tv_sec - start.tv_sec; ++ if (tv.tv_usec >= start.tv_usec) { ++ diff.tv_usec = tv.tv_usec - start.tv_usec; ++ } else { ++ diff.tv_sec--; ++ diff.tv_usec = 1000000 + tv.tv_usec - start.tv_usec; ++ } ++ ++ struct timedelta ret = { diff }; ++ return ret; ++} ++ + static enum callback_status + fill_struct(const char **namep, struct opt_c_struct *st, void *u) + { +@@ -114,3 +144,58 @@ show_summary(void) + + vect_destroy(&cdata.entries, NULL, NULL); + } ++ ++static void ++free_stringp_cb(const char **stringp, void *data) ++{ ++ free((char *)*stringp); ++} ++ ++void ++summary_account_call(struct library_symbol *libsym, struct timedelta spent) ++{ ++ assert(options.summary); ++ ++ if (dict_opt_c == NULL) { ++ dict_opt_c = malloc(sizeof(*dict_opt_c)); ++ if (dict_opt_c == NULL) { ++ oom: ++ fprintf(stderr, ++ "Can't allocate memory for " ++ "keeping track of -c.\n"); ++ free(dict_opt_c); ++ options.summary = 0; ++ return; ++ } ++ DICT_INIT(dict_opt_c, char *, struct opt_c_struct, ++ dict_hash_string, dict_eq_string, NULL); ++ } ++ ++ struct opt_c_struct *st = DICT_FIND_REF(dict_opt_c, &libsym->name, ++ struct opt_c_struct); ++ if (st == NULL) { ++ const char *na = strdup(libsym->name); ++ struct opt_c_struct new_st = {.count = 0, .tv = {0, 0}}; ++ if (na == NULL ++ || DICT_INSERT(dict_opt_c, &na, &new_st) < 0) { ++ free((char *) na); ++ DICT_DESTROY(dict_opt_c, const char *, ++ struct opt_c_struct, ++ free_stringp_cb, NULL, NULL); ++ goto oom; ++ } ++ st = DICT_FIND_REF(dict_opt_c, &libsym->name, ++ struct opt_c_struct); ++ assert(st != NULL); ++ } ++ ++ if (st->tv.tv_usec + spent.tm.tv_usec > 1000000) { ++ st->tv.tv_usec += spent.tm.tv_usec - 1000000; ++ st->tv.tv_sec++; ++ } else { ++ st->tv.tv_usec += spent.tm.tv_usec; ++ } ++ st->count++; ++ st->tv.tv_sec += spent.tm.tv_sec; ++ return; ++} +diff --git a/summary.h b/summary.h +new file mode 100644 +index 0000000..f680ef9 +--- /dev/null ++++ b/summary.h +@@ -0,0 +1,35 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2013 Petr Machata, Red Hat Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#ifndef _SUMMARY_H_ ++#define _SUMMARY_H_ ++ ++#include "forward.h" ++ ++struct timedelta { ++ struct timeval tm; ++}; ++ ++struct timedelta calc_time_spent(struct timeval start); ++void summary_account_call(struct library_symbol *libsym, ++ struct timedelta spent); ++void show_summary(void); ++ ++#endif /* _SUMMARY_H_ */ +diff --git a/testsuite/ltrace.minor/trace-exec.exp b/testsuite/ltrace.minor/trace-exec.exp +index 7a953de..57260f8 100644 +--- a/testsuite/ltrace.minor/trace-exec.exp ++++ b/testsuite/ltrace.minor/trace-exec.exp +@@ -1,5 +1,5 @@ + # This file is part of ltrace. +-# Copyright (C) 2012 Petr Machata, Red Hat Inc. ++# Copyright (C) 2012, 2013 Petr Machata, Red Hat Inc. + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License as +@@ -16,22 +16,30 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + # 02110-1301 USA + +-ltraceMatch [ltraceRun -xmain -- [ltraceCompile {} [ltraceSource c { ++set bin1 [ltraceCompile {} [ltraceSource c { + #include + #include + int main(int argc, char ** argv) { + execl(argv[1], argv[1], NULL); + abort(); + } +-}]] [ltraceCompile {} [ltraceSource c { ++}]] ++ ++set bin2 [ltraceCompile {} [ltraceSource c { + #include + int main(void) { + return puts("Hello, World."); + } +-}]]] { ++}]] ++ ++ltraceMatch [ltraceRun -xmain -- $bin1 $bin2] { + {{^execl\(} == 1} + {{^puts\(.*\) .*= 14} == 1} + {{^main\(} == 2} + } + ++ltraceMatch [ltraceRun -c -- $bin1 $bin2] { ++ {{exec} > 0} ++} ++ + ltraceDone +-- +1.7.6.5 + diff --git a/ltrace.spec b/ltrace.spec index 657be06..dce59e6 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -17,6 +17,10 @@ Source: ltrace-%{version}.tar.bz2 # Merge of several upstream commits that fixes compilation on ARM. Patch0: ltrace-0.7.91-arm.patch +# Upstream patch that fixes accounting of exec, __libc_start_main and +# others in -c output. +Patch1: ltrace-0.7.91-account_execl.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -30,6 +34,7 @@ execution of processes. %prep %setup -q -n %{name}-%{version} %patch0 -p1 +%patch1 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -54,6 +59,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Nov 21 2013 Petr Machata - 0.7.91-2 +- Fix a problem in including in summary (-c) function calls that don't + finish before exec or exit (ltrace-0.7.91-account_execl.patch) + * Tue Nov 5 2013 Petr Machata - 0.7.91-1 - Rebase to a pre-release 0.8 - Drop BR on autoconf and friends From 2742d61ae96a7151974e76029cce51888b572fa2 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 10 Jan 2014 00:28:24 +0100 Subject: [PATCH 007/100] Fix a problem in tracing across fork on PPC64 --- ltrace.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index dce59e6..f46e132 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 2%{?dist} +Release: 3%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -21,6 +21,9 @@ Patch0: ltrace-0.7.91-arm.patch # others in -c output. Patch1: ltrace-0.7.91-account_execl.patch +# Fix for a regression in tracing across fork. Upstream patch. +Patch2: ltrace-0.7.91-ppc64-fork.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -35,6 +38,7 @@ execution of processes. %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -59,6 +63,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jan 9 2014 Petr Machata - 0.7.91-3 +- Fix a problem in tracing across fork on PPC64 + (ltrace-0.7.91-ppc64-fork.patch) + * Thu Nov 21 2013 Petr Machata - 0.7.91-2 - Fix a problem in including in summary (-c) function calls that don't finish before exec or exit (ltrace-0.7.91-account_execl.patch) From 2128805bc3d1a5f175135eaecca8f5d96d502ef8 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 10 Jan 2014 00:33:06 +0100 Subject: [PATCH 008/100] Patch. --- ltrace-0.7.91-ppc64-fork.patch | 52 ++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 ltrace-0.7.91-ppc64-fork.patch diff --git a/ltrace-0.7.91-ppc64-fork.patch b/ltrace-0.7.91-ppc64-fork.patch new file mode 100644 index 0000000..53c66fd --- /dev/null +++ b/ltrace-0.7.91-ppc64-fork.patch @@ -0,0 +1,52 @@ +From 35742523e3daa0e59de0c1c3fdd8e5ff52891967 Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Thu, 9 Jan 2014 23:41:50 +0100 +Subject: [PATCH] Fix a problem in tracing across fork on PPC64 + +In order to avoid single-stepping through large portions of the +dynamic linker, ltrace remembers at which address the instruction that +resolved a PLT slot is. It then puts a breakpoint to this address so +that it can fast-forward to that address next time it needs to catch a +PLT slot being resolved. + +When a process is cloned, the pointer to this breakpoint is simply +copied over to the new process, instead of being looked up in the new +process structures. This patches fixes this. +--- + sysdeps/linux-gnu/ppc/plt.c | 14 +++++++++++++- + 1 files changed, 13 insertions(+), 1 deletions(-) + +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 3ec1397..8715da6 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012,2013 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2012,2013,2014 Petr Machata, Red Hat Inc. + * Copyright (C) 2004,2008,2009 Juan Cespedes + * Copyright (C) 2006 Paul Gilliam + * +@@ -1157,6 +1157,18 @@ int + arch_process_clone(struct process *retp, struct process *proc) + { + retp->arch = proc->arch; ++ ++ if (retp->arch.dl_plt_update_bp != NULL) { ++ /* Point it to the corresponding breakpoint in RETP. ++ * It must be there, this part of PROC has already ++ * been cloned to RETP. */ ++ retp->arch.dl_plt_update_bp ++ = address2bpstruct(retp, ++ retp->arch.dl_plt_update_bp->addr); ++ ++ assert(retp->arch.dl_plt_update_bp != NULL); ++ } ++ + return 0; + } + +-- +1.7.6.5 + From d4e3c8994919d1310611421b9e5a6f1044081c0b Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 10 Jan 2014 20:31:38 +0100 Subject: [PATCH 009/100] Fix crashing in calls through untraced slots in prelinked PPC64 binaries --- ltrace-0.7.91-breakpoint-on_install.patch | 81 ++++++++ ltrace-0.7.91-ppc64-unprelink.patch | 221 ++++++++++++++++++++++ ltrace.spec | 16 +- 3 files changed, 317 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-breakpoint-on_install.patch create mode 100644 ltrace-0.7.91-ppc64-unprelink.patch diff --git a/ltrace-0.7.91-breakpoint-on_install.patch b/ltrace-0.7.91-breakpoint-on_install.patch new file mode 100644 index 0000000..15959a3 --- /dev/null +++ b/ltrace-0.7.91-breakpoint-on_install.patch @@ -0,0 +1,81 @@ +From 56134ff5442bee4e128b189bb86cfc97dcb6f60a Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Fri, 10 Jan 2014 20:05:15 +0100 +Subject: [PATCH 1/2] Add a new per-breakpoint callback on_install + +--- + breakpoint.h | 9 ++++++++- + breakpoints.c | 11 ++++++++++- + 2 files changed, 18 insertions(+), 2 deletions(-) + +diff --git a/breakpoint.h b/breakpoint.h +index 95964a8..c36f673 100644 +--- a/breakpoint.h ++++ b/breakpoint.h +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012, 2013 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2012,2013,2014 Petr Machata, Red Hat Inc. + * Copyright (C) 2009 Juan Cespedes + * + * This program is free software; you can redistribute it and/or +@@ -46,6 +46,7 @@ + struct bp_callbacks { + void (*on_hit)(struct breakpoint *bp, struct process *proc); + void (*on_continue)(struct breakpoint *bp, struct process *proc); ++ void (*on_install)(struct breakpoint *bp, struct process *proc); + void (*on_retract)(struct breakpoint *bp, struct process *proc); + + /* Create a new breakpoint that should handle return from the +@@ -84,6 +85,12 @@ void breakpoint_on_continue(struct breakpoint *bp, struct process *proc); + * the instruction underneath it). */ + void breakpoint_on_retract(struct breakpoint *bp, struct process *proc); + ++/* Call ON_INSTALL handler of BP, if any is set. This should be ++ * called after the breakpoint is enabled for the first time, not ++ * every time it's enabled (such as after stepping over a site of a ++ * temporarily disabled breakpoint). */ ++void breakpoint_on_install(struct breakpoint *bp, struct process *proc); ++ + /* Call GET_RETURN_BP handler of BP, if any is set. If none is set, + * call CREATE_DEFAULT_RETURN_BP to obtain one. */ + int breakpoint_get_return_bp(struct breakpoint **ret, +diff --git a/breakpoints.c b/breakpoints.c +index 947cb71..c3fa275 100644 +--- a/breakpoints.c ++++ b/breakpoints.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2006,2007,2011,2012,2013 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2006,2007,2011,2012,2013,2014 Petr Machata, Red Hat Inc. + * Copyright (C) 2009 Juan Cespedes + * Copyright (C) 1998,2001,2002,2003,2007,2008,2009 Juan Cespedes + * Copyright (C) 2006 Ian Wienand +@@ -85,6 +85,14 @@ breakpoint_on_retract(struct breakpoint *bp, struct process *proc) + (bp->cbs->on_retract)(bp, proc); + } + ++void ++breakpoint_on_install(struct breakpoint *bp, struct process *proc) ++{ ++ assert(bp != NULL); ++ if (bp->cbs != NULL && bp->cbs->on_install != NULL) ++ (bp->cbs->on_install)(bp, proc); ++} ++ + int + breakpoint_get_return_bp(struct breakpoint **ret, + struct breakpoint *bp, struct process *proc) +@@ -229,6 +237,7 @@ breakpoint_turn_on(struct breakpoint *bp, struct process *proc) + if (bp->enabled == 1) { + assert(proc->pid != 0); + enable_breakpoint(proc, bp); ++ breakpoint_on_install(bp, proc); + } + return 0; + } +-- +1.7.6.5 + diff --git a/ltrace-0.7.91-ppc64-unprelink.patch b/ltrace-0.7.91-ppc64-unprelink.patch new file mode 100644 index 0000000..a5929e3 --- /dev/null +++ b/ltrace-0.7.91-ppc64-unprelink.patch @@ -0,0 +1,221 @@ +From a0093ca43cf40d7e5f6cebeb64156062d2de46d9 Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Fri, 10 Jan 2014 20:06:51 +0100 +Subject: [PATCH 2/2] Don't crash untraced calls via PLT in prelinked PPC64 + binaries + +In prelinked binaries, ltrace has to unprelinks PLT slots in order to +catch calls done through PLT. This makes the calls done through these +slots invalid, because the special first PLT slot is not initialized, +and dynamic linker SIGSEGVs because of this. Ltrace relies on +arranging breakpoints such that the dynamic linker is not actually +entered, and moves PC around itself to simulate the effects of a call +through PLT. + +Originally, arch_elf_add_plt_entry was called only for symbols that +were actually traced. Later this was changed and it's now called for +all PLT entries, and the resulting candidate list is filtered +afterwards. This gives backends a chance to rename the symbol, as is +useful with IRELATIVE PLT calls, where symbol name may not be +available at all. But the PPC backend was never updated to reflect +this, and unresolved all symbols for which arch_elf_add_plt_entry was +called, thus rendering _all_ PLT slots invalid, even those that +weren't later procted by breakpoints. Thus calls done through any +untraced slots failed. + +This patch fixes this problem by deferring the unprelinking of PLT +slots into the on_install hook of breakpoints. +--- + sysdeps/linux-gnu/ppc/arch.h | 21 ++++++++- + sysdeps/linux-gnu/ppc/plt.c | 94 +++++++++++++++++++++++++++++++++-------- + 2 files changed, 94 insertions(+), 21 deletions(-) + +diff --git a/sysdeps/linux-gnu/ppc/arch.h b/sysdeps/linux-gnu/ppc/arch.h +index 2add3b8..bf9b5dc 100644 +--- a/sysdeps/linux-gnu/ppc/arch.h ++++ b/sysdeps/linux-gnu/ppc/arch.h +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012,2013 Petr Machata ++ * Copyright (C) 2012,2013,2014 Petr Machata + * Copyright (C) 2006 Paul Gilliam + * Copyright (C) 2002,2004 Juan Cespedes + * +@@ -87,12 +87,29 @@ enum ppc64_plt_type { + /* Very similar to PPC_PLT_UNRESOLVED, but for JMP_IREL + * slots. */ + PPC_PLT_IRELATIVE, ++ ++ /* Transitional state before the breakpoint is enabled. */ ++ PPC_PLT_NEED_UNRESOLVE, + }; + + #define ARCH_HAVE_LIBRARY_SYMBOL_DATA ++struct ppc_unresolve_data; + struct arch_library_symbol_data { + enum ppc64_plt_type type; +- GElf_Addr resolved_value; ++ ++ /* State Contents ++ * ++ * PPC_DEFAULT N/A ++ * PPC64_PLT_STUB N/A ++ * PPC_PLT_UNRESOLVED PLT entry address. ++ * PPC_PLT_IRELATIVE Likewise. ++ * PPC_PLT_RESOLVED The original value the slot was resolved to. ++ * PPC_PLT_NEED_UNRESOLVE DATA. ++ */ ++ union { ++ GElf_Addr resolved_value; ++ struct ppc_unresolve_data *data; ++ }; + + /* Address of corresponding slot in .plt. */ + GElf_Addr plt_slot_addr; +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 8715da6..332daa8 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -679,6 +679,14 @@ arch_elf_add_func_entry(struct process *proc, struct ltelf *lte, + return PLT_OK; + } + ++struct ppc_unresolve_data { ++ struct ppc_unresolve_data *self; /* A canary. */ ++ GElf_Addr plt_entry_addr; ++ GElf_Addr plt_slot_addr; ++ GElf_Addr plt_slot_value; ++ bool is_irelative; ++}; ++ + enum plt_status + arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, + const char *a_name, GElf_Rela *rela, size_t ndx, +@@ -778,28 +786,23 @@ arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, + && (plt_slot_value == plt_entry_addr || plt_slot_value == 0)) { + libsym->arch.type = PPC_PLT_UNRESOLVED; + libsym->arch.resolved_value = plt_entry_addr; +- + } else { +- /* Unresolve the .plt slot. If the binary was +- * prelinked, this makes the code invalid, because in +- * case of prelinked binary, the dynamic linker +- * doesn't update .plt[0] and .plt[1] with addresses +- * of the resover. But we don't care, we will never +- * need to enter the resolver. That just means that +- * we have to un-un-resolve this back before we +- * detach. */ +- +- if (unresolve_plt_slot(proc, plt_slot_addr, plt_entry_addr) < 0) { +- library_symbol_destroy(libsym); ++ /* Mark the symbol for later unresolving. We may not ++ * do this right away, as this is called by ltrace ++ * core for all symbols, and only later filtered. We ++ * only unresolve the symbol before the breakpoint is ++ * enabled. */ ++ ++ libsym->arch.type = PPC_PLT_NEED_UNRESOLVE; ++ libsym->arch.data = malloc(sizeof *libsym->arch.data); ++ if (libsym->arch.data == NULL) + goto fail2; +- } + +- if (! is_irelative) { +- mark_as_resolved(libsym, plt_slot_value); +- } else { +- libsym->arch.type = PPC_PLT_IRELATIVE; +- libsym->arch.resolved_value = plt_entry_addr; +- } ++ libsym->arch.data->self = libsym->arch.data; ++ libsym->arch.data->plt_entry_addr = plt_entry_addr; ++ libsym->arch.data->plt_slot_addr = plt_slot_addr; ++ libsym->arch.data->plt_slot_value = plt_slot_value; ++ libsym->arch.data->is_irelative = is_irelative; + } + + *ret = libsym; +@@ -999,6 +1002,7 @@ ppc_plt_bp_continue(struct breakpoint *bp, struct process *proc) + return; + + case PPC64_PLT_STUB: ++ case PPC_PLT_NEED_UNRESOLVE: + /* These should never hit here. */ + break; + } +@@ -1050,6 +1054,52 @@ ppc_plt_bp_retract(struct breakpoint *bp, struct process *proc) + } + } + ++static void ++ppc_plt_bp_install(struct breakpoint *bp, struct process *proc) ++{ ++ /* This should not be an artificial breakpoint. */ ++ struct library_symbol *libsym = bp->libsym; ++ if (libsym == NULL) ++ libsym = bp->arch.irel_libsym; ++ assert(libsym != NULL); ++ ++ if (libsym->arch.type == PPC_PLT_NEED_UNRESOLVE) { ++ /* Unresolve the .plt slot. If the binary was ++ * prelinked, this makes the code invalid, because in ++ * case of prelinked binary, the dynamic linker ++ * doesn't update .plt[0] and .plt[1] with addresses ++ * of the resover. But we don't care, we will never ++ * need to enter the resolver. That just means that ++ * we have to un-un-resolve this back before we ++ * detach. */ ++ ++ struct ppc_unresolve_data *data = libsym->arch.data; ++ libsym->arch.data = NULL; ++ assert(data->self == data); ++ ++ GElf_Addr plt_slot_addr = data->plt_slot_addr; ++ GElf_Addr plt_slot_value = data->plt_slot_value; ++ GElf_Addr plt_entry_addr = data->plt_entry_addr; ++ ++ if (unresolve_plt_slot(proc, plt_slot_addr, ++ plt_entry_addr) == 0) { ++ if (! data->is_irelative) { ++ mark_as_resolved(libsym, plt_slot_value); ++ } else { ++ libsym->arch.type = PPC_PLT_IRELATIVE; ++ libsym->arch.resolved_value = plt_entry_addr; ++ } ++ } else { ++ fprintf(stderr, "Couldn't unresolve %s@%p. Not tracing" ++ " this symbol.\n", ++ breakpoint_name(bp), bp->addr); ++ proc_remove_breakpoint(proc, bp); ++ } ++ ++ free(data); ++ } ++} ++ + int + arch_library_init(struct library *lib) + { +@@ -1080,6 +1130,11 @@ arch_library_symbol_init(struct library_symbol *libsym) + void + arch_library_symbol_destroy(struct library_symbol *libsym) + { ++ if (libsym->arch.type == PPC_PLT_NEED_UNRESOLVE) { ++ assert(libsym->arch.data->self == libsym->arch.data); ++ free(libsym->arch.data); ++ libsym->arch.data = NULL; ++ } + } + + int +@@ -1115,6 +1170,7 @@ arch_breakpoint_init(struct process *proc, struct breakpoint *bp) + static struct bp_callbacks cbs = { + .on_continue = ppc_plt_bp_continue, + .on_retract = ppc_plt_bp_retract, ++ .on_install = ppc_plt_bp_install, + }; + breakpoint_set_callbacks(bp, &cbs); + +-- +1.7.6.5 + diff --git a/ltrace.spec b/ltrace.spec index f46e132..15b00dc 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 3%{?dist} +Release: 4%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -24,6 +24,12 @@ Patch1: ltrace-0.7.91-account_execl.patch # Fix for a regression in tracing across fork. Upstream patch. Patch2: ltrace-0.7.91-ppc64-fork.patch +# Fix crashing a prelinked PPC64 binary which makes PLT calls through +# slots that ltrace doesn't trace. +# https://bugzilla.redhat.com/show_bug.cgi?id=1051221 +Patch3: ltrace-0.7.91-breakpoint-on_install.patch +Patch4: ltrace-0.7.91-ppc64-unprelink.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -39,6 +45,8 @@ execution of processes. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 +%patch4 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -63,6 +71,12 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Jan 10 2014 Petr Machata - 0.7.91-4 +- Fix crashing a prelinked PPC64 binary which makes PLT calls through + slots that ltrace doesn't trace. + (ltrace-0.7.91-breakpoint-on_install.patch, + ltrace-0.7.91-ppc64-unprelink.patch) + * Thu Jan 9 2014 Petr Machata - 0.7.91-3 - Fix a problem in tracing across fork on PPC64 (ltrace-0.7.91-ppc64-fork.patch) From cc2bc6c5066e98b18a1235007d7f079f6c1f46f0 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 14 Jan 2014 16:06:35 +0100 Subject: [PATCH 010/100] Man page nits --- ltrace-0.7.91-man.patch | 45 +++++++++++++++++++++++++++++++++++++++++ ltrace.spec | 9 ++++++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-man.patch diff --git a/ltrace-0.7.91-man.patch b/ltrace-0.7.91-man.patch new file mode 100644 index 0000000..d7a7dbf --- /dev/null +++ b/ltrace-0.7.91-man.patch @@ -0,0 +1,45 @@ +diff -up ltrace-0.7.91/options.c\~ ltrace-0.7.91/options.c +--- ltrace-0.7.91/options.c~ 2013-10-22 11:54:21.000000000 +0200 ++++ ltrace-0.7.91/options.c 2014-01-13 15:38:51.362221740 +0100 +@@ -128,6 +128,8 @@ usage_debug(void) { + "\n" + "Debugging options are mixed using bitwise-or.\n" + "Note that the meanings and values are subject to change.\n" ++ "Also note that these values are used inconsistently in ltrace, and the\n" ++ "only debuglevel that you can rely on is -D77 that will show everything.\n" + ); + } + +diff -up ltrace-0.7.91/ltrace.1\~ ltrace-0.7.91/ltrace.1 +--- ltrace-0.7.91/ltrace.1~ 2013-10-23 17:44:13.000000000 +0200 ++++ ltrace-0.7.91/ltrace.1 2014-01-13 15:51:24.236730677 +0100 +@@ -1,5 +1,5 @@ + .\" -*-nroff-*- +-.\" Copyright (c) 2012, 2013 Petr Machata, Red Hat Inc. ++.\" Copyright (c) 2012,2013,2014 Petr Machata, Red Hat Inc. + .\" Copyright (c) 1997-2005 Juan Cespedes + .\" + .\" This program is free software; you can redistribute it and/or +@@ -118,9 +118,9 @@ Besides removing any initial underscore + this makes C++ function names readable. + .IP "\-D, \-\-debug \fRmask\fI" + Show debugging output of \fBltrace\fR itself. \fImask\fR is a number +-with internal meaning that's not really well defined at all. +-\fImask\fR of 77 shows all debug messages, which is what you usually +-need. ++describing which debug messages should be displayed. Use the option ++\-Dh to see what can be used, but note that currently the only ++reliable debugmask is 77, which shows all debug messages. + .IP "\-e \fIfilter" + A qualifying expression which modifies which library calls to trace. + The format of the filter expression is described in the section +@@ -156,7 +156,8 @@ dependency ordering. If you want to mak + library are actually called, use \fB-x @\fIlibrary_pattern\fR instead. + .IP \-L + When no -e option is given, don't assume the default action of +-\fB@MAIN\fR. ++\fB@MAIN\fR. In practice this means that library calls will not be ++traced. + .IP "\-n, \-\-indent \fInr" + Indent trace output by \fInr\fR spaces for each level of call + nesting. Using this option makes the program flow visualization easy diff --git a/ltrace.spec b/ltrace.spec index 15b00dc..733a554 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 4%{?dist} +Release: 5%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -30,6 +30,9 @@ Patch2: ltrace-0.7.91-ppc64-fork.patch Patch3: ltrace-0.7.91-breakpoint-on_install.patch Patch4: ltrace-0.7.91-ppc64-unprelink.patch +# Man page nits. Backport of an upstream patch. +Patch5: ltrace-0.7.91-man.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -47,6 +50,7 @@ execution of processes. %patch2 -p1 %patch3 -p1 %patch4 -p1 +%patch5 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -71,6 +75,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Jan 14 2014 Petr Machata - 0.7.91-5 +- Fix a couple nits in ltrace.1 (ltrace-0.7.91-man.patch) + * Fri Jan 10 2014 Petr Machata - 0.7.91-4 - Fix crashing a prelinked PPC64 binary which makes PLT calls through slots that ltrace doesn't trace. From 3eda79ec21b4c63838239ae73b125c476966e605 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 14 Jan 2014 16:16:17 +0100 Subject: [PATCH 011/100] Port a couple more patches from upstream --- ltrace-0.7.91-s390-fetch-syscall.patch | 69 +++++++++++ ltrace-0.7.91-s390-irelative.patch | 67 +++++++++++ ltrace-0.7.91-x86_64-irelative.patch | 156 +++++++++++++++++++++++++ ltrace.spec | 27 ++++- 4 files changed, 315 insertions(+), 4 deletions(-) create mode 100644 ltrace-0.7.91-s390-fetch-syscall.patch create mode 100644 ltrace-0.7.91-s390-irelative.patch create mode 100644 ltrace-0.7.91-x86_64-irelative.patch diff --git a/ltrace-0.7.91-s390-fetch-syscall.patch b/ltrace-0.7.91-s390-fetch-syscall.patch new file mode 100644 index 0000000..da50b48 --- /dev/null +++ b/ltrace-0.7.91-s390-fetch-syscall.patch @@ -0,0 +1,69 @@ +@@ -, +, @@ + exe->mount("source", "target", "filesystemtype", 0, nil + mount@SYS("", "target", "filesystemtype", 0, nil) = -2 + <... mount resumed> = -1 +--- + sysdeps/linux-gnu/s390/fetch.c | 17 ++++++++++++----- + 1 files changed, 12 insertions(+), 5 deletions(-) +--- a/sysdeps/linux-gnu/s390/fetch.c ++++ a/sysdeps/linux-gnu/s390/fetch.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -61,7 +62,8 @@ s390x(struct fetch_context *ctx) + } + + static int +-fetch_register_banks(struct process *proc, struct fetch_context *ctx) ++fetch_register_banks(struct process *proc, struct fetch_context *ctx, ++ bool syscall_enter) + { + ptrace_area parea; + parea.len = sizeof(ctx->regs); +@@ -72,15 +74,20 @@ fetch_register_banks(struct process *proc, struct fetch_context *ctx) + strerror(errno)); + return -1; + } ++ ++ if (syscall_enter) ++ ctx->regs.gprs[2] = ctx->regs.orig_gpr2; ++ + return 0; + } + + static int +-fetch_context_init(struct process *proc, struct fetch_context *context) ++fetch_context_init(struct process *proc, struct fetch_context *context, ++ bool syscall_enter) + { + context->greg = 2; + context->freg = 0; +- return fetch_register_banks(proc, context); ++ return fetch_register_banks(proc, context, syscall_enter); + } + + struct fetch_context * +@@ -89,7 +96,7 @@ arch_fetch_arg_init(enum tof type, struct process *proc, + { + struct fetch_context *context = malloc(sizeof(*context)); + if (context == NULL +- || fetch_context_init(proc, context) < 0) { ++ || fetch_context_init(proc, context, type == LT_TOF_SYSCALL) < 0) { + fprintf(stderr, "arch_fetch_arg_init: %s\n", + strerror(errno)); + free(context); +@@ -277,7 +284,7 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, + return 0; + } + +- if (fetch_context_init(proc, ctx) < 0) ++ if (fetch_context_init(proc, ctx, false) < 0) + return -1; + return arch_fetch_arg_next(ctx, type, proc, info, valuep); + } +-- diff --git a/ltrace-0.7.91-s390-irelative.patch b/ltrace-0.7.91-s390-irelative.patch new file mode 100644 index 0000000..29222c9 --- /dev/null +++ b/ltrace-0.7.91-s390-irelative.patch @@ -0,0 +1,67 @@ +@@ -, +, @@ +--- + sysdeps/linux-gnu/s390/arch.h | 2 ++ + sysdeps/linux-gnu/s390/plt.c | 22 ++++++++++++++++++++++ + 2 files changed, 24 insertions(+) +--- a/sysdeps/linux-gnu/s390/arch.h ++++ a/sysdeps/linux-gnu/s390/arch.h +@@ -1,5 +1,6 @@ + /* + * This file is part of ltrace. ++ * Copyright (C) 2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2001 IBM Poughkeepsie, IBM Corporation + * + * This program is free software; you can redistribute it and/or +@@ -25,6 +26,7 @@ + #define ARCH_HAVE_FETCH_ARG + #define ARCH_HAVE_SIZEOF + #define ARCH_HAVE_ALIGNOF ++#define ARCH_HAVE_ADD_PLT_ENTRY + + #define LT_ELFCLASS ELFCLASS32 + #define LT_ELF_MACHINE EM_S390 +--- a/sysdeps/linux-gnu/s390/plt.c ++++ a/sysdeps/linux-gnu/s390/plt.c +@@ -1,5 +1,6 @@ + /* + * This file is part of ltrace. ++ * Copyright (C) 2013 Petr Machata, Red Hat Inc. + * Copyright (C) 2004,2008,2009 Juan Cespedes + * + * This program is free software; you can redistribute it and/or +@@ -19,9 +20,12 @@ + */ + + #include ++#include ++ + #include "proc.h" + #include "common.h" + #include "library.h" ++#include "trace.h" + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela * rela) { +@@ -33,3 +37,21 @@ sym2addr(struct process *proc, struct library_symbol *sym) + { + return sym->enter_addr; + } ++ ++enum plt_status ++arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, ++ const char *a_name, GElf_Rela *rela, size_t ndx, ++ struct library_symbol **ret) ++{ ++#ifdef R_390_IRELATIVE ++ bool irelative = GELF_R_TYPE(rela->r_info) == R_390_IRELATIVE; ++#else ++ bool irelative = false; ++#endif ++ ++ if (irelative) ++ return linux_elf_add_plt_entry_irelative(proc, lte, rela, ++ ndx, ret); ++ ++ return PLT_DEFAULT; ++} +-- diff --git a/ltrace-0.7.91-x86_64-irelative.patch b/ltrace-0.7.91-x86_64-irelative.patch new file mode 100644 index 0000000..949b5fb --- /dev/null +++ b/ltrace-0.7.91-x86_64-irelative.patch @@ -0,0 +1,156 @@ +@@ -, +, @@ + relocation +- In general they are. But IRELATIVE relocations are sorted to come + last, and PLT entries are not sorted accordingly. +--- + sysdeps/linux-gnu/x86/arch.h | 11 +++++ + sysdeps/linux-gnu/x86/plt.c | 101 +++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 111 insertions(+), 1 deletions(-) +--- a/sysdeps/linux-gnu/x86/arch.h ++++ a/sysdeps/linux-gnu/x86/arch.h +@@ -19,6 +19,10 @@ + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA + */ ++#ifndef LTRACE_X86_ARCH_H ++#define LTRACE_X86_ARCH_H ++ ++#include "vect.h" + + #define BREAKPOINT_VALUE {0xcc} + #define BREAKPOINT_LENGTH 1 +@@ -30,9 +34,16 @@ + + #define ARCH_HAVE_ADD_PLT_ENTRY + ++#define ARCH_HAVE_LTELF_DATA ++struct arch_ltelf_data { ++ struct vect plt_map; ++}; ++ + #ifdef __x86_64__ + #define LT_ELFCLASS ELFCLASS64 + #define LT_ELF_MACHINE EM_X86_64 + #endif + #define LT_ELFCLASS2 ELFCLASS32 + #define LT_ELF_MACHINE2 EM_386 ++ ++#endif /* LTRACE_X86_ARCH_H */ +--- a/sysdeps/linux-gnu/x86/plt.c ++++ a/sysdeps/linux-gnu/x86/plt.c +@@ -27,10 +27,19 @@ + #include "library.h" + #include "trace.h" + ++static GElf_Addr ++x86_plt_offset(uint32_t i) ++{ ++ /* Skip the first PLT entry, which contains a stub to call the ++ * resolver. */ ++ return (i + 1) * 16; ++} ++ + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela) + { +- return lte->plt_addr + (ndx + 1) * 16; ++ uint32_t i = *VECT_ELEMENT(<e->arch.plt_map, uint32_t, ndx); ++ return x86_plt_offset(i) + lte->plt_addr; + } + + void * +@@ -62,3 +71,93 @@ arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, + + return PLT_DEFAULT; + } ++ ++int ++arch_elf_init(struct ltelf *lte, struct library *lib) ++{ ++ VECT_INIT(<e->arch.plt_map, unsigned int); ++ ++ /* IRELATIVE slots may make the whole situation a fair deal ++ * more complex. On x86{,_64}, the PLT slots are not ++ * presented in the order of the corresponding relocations, ++ * but in the order it which these symbols are in the symbol ++ * table. That's static symbol table, which may be stripped ++ * off, not dynsym--that doesn't contain IFUNC symbols at all. ++ * So we have to decode each PLT entry to figure out what ++ * entry it corresponds to. We need to interpret the PLT ++ * table to figure this out. ++ * ++ * On i386, the PLT entry format is as follows: ++ * ++ * 8048300: ff 25 0c a0 04 08 jmp *0x804a00c ++ * 8048306: 68 20 00 00 00 push $0x20 ++ * 804830b: e9 e0 ff ff ff jmp 80482f0 <_init+0x30> ++ * ++ * For PIE binaries it is the following: ++ * ++ * 410: ff a3 10 00 00 00 jmp *0x10(%ebx) ++ * 416: 68 00 00 00 00 push $0x0 ++ * 41b: e9 d0 ff ff ff jmp 3f0 <_init+0x30> ++ * ++ * On x86_64, it is: ++ * ++ * 400420: ff 25 f2 0b 20 00 jmpq *0x200bf2(%rip) # 601018 <_GLOBAL_OFFSET_TABLE_+0x18> ++ * 400426: 68 00 00 00 00 pushq $0x0 ++ * 40042b: e9 e0 ff ff ff jmpq 400410 <_init+0x18> ++ * ++ * On i386, the argument to push is an offset of relocation to ++ * use. The first PLT slot has an offset of 0x0, the second ++ * 0x8, etc. On x86_64, it's directly the index that we are ++ * looking for. ++ */ ++ ++ /* Here we scan the PLT table and initialize a map of ++ * relocation->slot number in lte->arch.plt_map. */ ++ ++ size_t i; ++ for (i = 0; i < vect_size(<e->plt_relocs); ++i) { ++ ++ GElf_Addr offset = x86_plt_offset(i); ++ uint32_t reloc_arg = 0; ++ ++ uint8_t byte; ++ if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 ++ || byte != 0xff ++ || elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 ++ || (byte != 0xa3 && byte != 0x25)) ++ goto next; ++ ++ /* Skip immediate argument in the instruction. */ ++ offset += 4; ++ ++ if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 ++ || byte != 0x68 ++ || elf_read_next_u32(lte->plt_data, ++ &offset, &reloc_arg) < 0) { ++ reloc_arg = 0; ++ goto next; ++ } ++ ++ if (lte->ehdr.e_machine == EM_386) { ++ if (reloc_arg % 8 != 0) { ++ reloc_arg = 0; ++ goto next; ++ } ++ reloc_arg /= 8; ++ } ++ ++ next: ++ if (VECT_PUSHBACK(<e->arch.plt_map, &reloc_arg) < 0) { ++ arch_elf_destroy(lte); ++ return -1; ++ } ++ } ++ ++ return 0; ++} ++ ++void ++arch_elf_destroy(struct ltelf *lte) ++{ ++ VECT_DESTROY(<e->arch.plt_map, uint32_t, NULL, NULL); ++} +-- diff --git a/ltrace.spec b/ltrace.spec index 733a554..7760e46 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -21,17 +21,27 @@ Patch0: ltrace-0.7.91-arm.patch # others in -c output. Patch1: ltrace-0.7.91-account_execl.patch +# Upstream patch that fixes interpretation of PLT on x86_64 when +# IRELATIVE slots are present. +Patch2: ltrace-0.7.91-x86_64-irelative.patch + +# Upstream patch that fixes fetching of system call arguments on s390. +Patch3: ltrace-0.7.91-s390-fetch-syscall.patch + +# Upstream patch that enables tracing of IRELATIVE PLT slots on s390. +Patch4: ltrace-0.7.91-s390-irelative.patch + # Fix for a regression in tracing across fork. Upstream patch. -Patch2: ltrace-0.7.91-ppc64-fork.patch +Patch5: ltrace-0.7.91-ppc64-fork.patch # Fix crashing a prelinked PPC64 binary which makes PLT calls through # slots that ltrace doesn't trace. # https://bugzilla.redhat.com/show_bug.cgi?id=1051221 -Patch3: ltrace-0.7.91-breakpoint-on_install.patch -Patch4: ltrace-0.7.91-ppc64-unprelink.patch +Patch6: ltrace-0.7.91-breakpoint-on_install.patch +Patch7: ltrace-0.7.91-ppc64-unprelink.patch # Man page nits. Backport of an upstream patch. -Patch5: ltrace-0.7.91-man.patch +Patch8: ltrace-0.7.91-man.patch %description Ltrace is a debugging program which runs a specified command until the @@ -51,6 +61,9 @@ execution of processes. %patch3 -p1 %patch4 -p1 %patch5 -p1 +%patch6 -p1 +%patch7 -p1 +%patch8 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -76,6 +89,12 @@ echo ====================TESTING END===================== %changelog * Tue Jan 14 2014 Petr Machata - 0.7.91-5 +- Fix interpretation of x86_64 PLT with IRELATIVE slots. + (ltrace-0.7.91-x86_64-irelative.patch) +- Fix fetching of system call arguments on s390. + (ltrace-0.7.91-s390-fetch-syscall.patch) +- Enable tracing of IRELATIVE PLT slots on s390. + (ltrace-0.7.91-s390-irelative.patch) - Fix a couple nits in ltrace.1 (ltrace-0.7.91-man.patch) * Fri Jan 10 2014 Petr Machata - 0.7.91-4 From c1bce5fd6beda99854d925cfc3e1da87846b95e6 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 15 Jan 2014 18:17:02 +0100 Subject: [PATCH 012/100] Fix a problem in handling a failure to open an ELF file --- ltrace-0.7.91-cant_open.patch | 36 +++++++++++++++++++++++++++++++++++ ltrace.spec | 10 +++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-cant_open.patch diff --git a/ltrace-0.7.91-cant_open.patch b/ltrace-0.7.91-cant_open.patch new file mode 100644 index 0000000..4d3a0d4 --- /dev/null +++ b/ltrace-0.7.91-cant_open.patch @@ -0,0 +1,36 @@ +diff -urp ltrace-0.7.91/libltrace.c master/libltrace.c +--- ltrace-0.7.91/libltrace.c 2014-01-14 16:31:37.696174464 +0100 ++++ master/libltrace.c 2013-11-21 14:06:38.623701688 +0100 +@@ -113,9 +117,13 @@ ltrace_init(int argc, char **argv) { + if (command) { + /* Check that the binary ABI is supported before + * calling execute_program. */ +- struct ltelf lte; +- ltelf_init(<e, command); +- ltelf_destroy(<e); ++ { ++ struct ltelf lte; ++ if (ltelf_init(<e, command) == 0) ++ ltelf_destroy(<e); ++ else ++ exit(EXIT_FAILURE); ++ } + + pid_t pid = execute_program(command, argv); + struct process *proc = open_program(command, pid); +diff -urp ltrace-0.7.91/ltrace-elf.c master/ltrace-elf.c +--- ltrace-0.7.91/ltrace-elf.c 2014-01-14 16:31:37.688174420 +0100 ++++ master/ltrace-elf.c 2013-11-22 18:17:11.767721609 +0100 +@@ -361,8 +361,11 @@ ltelf_init(struct ltelf *lte, const char + { + memset(lte, 0, sizeof *lte); + lte->fd = open(filename, O_RDONLY); +- if (lte->fd == -1) ++ if (lte->fd == -1) { ++ fprintf(stderr, "Can't open %s: %s\n", filename, ++ strerror(errno)); + return 1; ++ } + + elf_version(EV_CURRENT); + diff --git a/ltrace.spec b/ltrace.spec index 7760e46..dfae059 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 5%{?dist} +Release: 6%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -43,6 +43,9 @@ Patch7: ltrace-0.7.91-ppc64-unprelink.patch # Man page nits. Backport of an upstream patch. Patch8: ltrace-0.7.91-man.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1044766 +Patch9: ltrace-0.7.91-cant_open.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -64,6 +67,7 @@ execution of processes. %patch6 -p1 %patch7 -p1 %patch8 -p1 +%patch9 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -88,6 +92,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Jan 14 2014 Petr Machata - 0.7.91-6 +- Fix a problem when an invalid command has been found + (ltrace-0.7.91-cant_open.patch) + * Tue Jan 14 2014 Petr Machata - 0.7.91-5 - Fix interpretation of x86_64 PLT with IRELATIVE slots. (ltrace-0.7.91-x86_64-irelative.patch) From 735db88722c3ab4dfa78c20751d41513a93fdbca Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 13 Feb 2014 16:27:34 +0100 Subject: [PATCH 013/100] Support aarch64, fix e_machine initialization on multi-threaded attach --- ltrace-0.7.2-e_machine.patch | 20 + ltrace-0.7.91-aarch64.patch | 2416 ++++++++++++++++++++++++++++++++++ ltrace.spec | 17 +- 3 files changed, 2452 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.2-e_machine.patch create mode 100644 ltrace-0.7.91-aarch64.patch diff --git a/ltrace-0.7.2-e_machine.patch b/ltrace-0.7.2-e_machine.patch new file mode 100644 index 0000000..2cfc15a --- /dev/null +++ b/ltrace-0.7.2-e_machine.patch @@ -0,0 +1,20 @@ +diff -up ltrace-0.7.2/proc.c\~ ltrace-0.7.2/proc.c +--- ltrace-0.7.2/proc.c~ 2014-02-13 12:16:33.000000000 +0100 ++++ ltrace-0.7.2/proc.c 2014-02-13 15:44:25.000000000 +0100 +@@ -194,9 +197,11 @@ process_init(struct process *proc, const + goto fail; + } + +- if (proc->leader != proc) +- return 0; +- if (process_init_main(proc) < 0) { ++ if (proc->leader != proc) { ++ proc->e_machine = proc->leader->e_machine; ++ proc->e_class = proc->leader->e_class; ++ get_arch_dep(proc); ++ } else if (process_init_main(proc) < 0) { + process_bare_destroy(proc, 0); + goto fail; + } + +Diff finished. Thu Feb 13 15:50:21 2014 diff --git a/ltrace-0.7.91-aarch64.patch b/ltrace-0.7.91-aarch64.patch new file mode 100644 index 0000000..123cfe1 --- /dev/null +++ b/ltrace-0.7.91-aarch64.patch @@ -0,0 +1,2416 @@ +diff --git a/README b/README +index 414bdfb..a04b767 100644 +--- a/README ++++ b/README +@@ -24,6 +24,7 @@ The following targets are currently (at least somewhat) supported. + Some of them may be more or less broken in reality, it is not feasible + to test each release comprehensively on each target. + ++ aarch64-*-linux-gnu + armv6l-*-linux-gnueabi + armv7l-*-linux-gnueabihf + i[4567]86-*-linux-gnu +@@ -81,7 +82,7 @@ quick one-liner), it is advisable to send an e-mail beforehand. + + + ------------------------------------------------------------------------------- +-Copyright (C) 2012,2013 Petr Machata ++Copyright (C) 2012-2014 Petr Machata + Copyright (C) 1997-2009 Juan Cespedes + This file is part of ltrace. + +diff --git a/configure.ac b/configure.ac +index c6e6bf0..0e9a124 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1,6 +1,6 @@ + # -*- Autoconf -*- + # This file is part of ltrace. +-# Copyright (C) 2010,2012,2013 Petr Machata, Red Hat Inc. ++# Copyright (C) 2010,2012,2013,2014 Petr Machata, Red Hat Inc. + # Copyright (C) 2010,2011 Joe Damato + # Copyright (C) 2010 Marc Kleine-Budde + # Copyright (C) 2010 Zachary T Welch +@@ -399,6 +399,7 @@ AC_CONFIG_FILES([ + Makefile + sysdeps/Makefile + sysdeps/linux-gnu/Makefile ++ sysdeps/linux-gnu/aarch64/Makefile + sysdeps/linux-gnu/alpha/Makefile + sysdeps/linux-gnu/arm/Makefile + sysdeps/linux-gnu/cris/Makefile +diff --git a/etc/libc.so.conf b/etc/libc.so.conf +index 669c50a..48b3b01 100644 +--- a/etc/libc.so.conf ++++ b/etc/libc.so.conf +@@ -1,5 +1,12 @@ + # See ltrace.conf(5) for description of syntax of this file. + ++# XXX ltrace misses long double and long long support ++typedef ldouble = double; ++typedef llong = long; ++typedef ullong = ulong; ++ ++void __libc_start_main(hide(void*), hide(int), array(string, arg2)); ++ + # arpa/inet.h + typedef in_addr = struct(hex(uint)); + int inet_aton(string, +in_addr*); +@@ -233,9 +240,22 @@ void setbuffer(file,addr,ulong); + void setlinebuf(file); + int rename(string,string); + ++# xlocale.h ++typedef locale_t = void*; ++locale_t newlocale(hex(int), string, locale_t); ++ + # stdlib.h +-long __strtol_internal(string,addr,int); +-ulong __strtoul_internal(string,addr,int); ++long __strtol_internal(string, +string*, int); ++ulong __strtoul_internal(string, +string*, int); ++ ++double strtod(string, +string*); ++float strtof(string, +string*); ++ldouble strtold(string, +string*); ++ ++double strtod_l(string, +string*, locale_t); ++float strtof_l(string, +string*, locale_t); ++ldouble strtold_l(string, +string*, locale_t); ++ + int atexit(addr); + addr bsearch(string, addr, ulong, ulong, addr); + addr calloc(ulong, ulong); +@@ -343,6 +363,10 @@ addr gmtime(addr); + addr localtime(addr); + ulong strftime(+string2,ulong,string,addr); + long time(addr); ++# XXX in fact (time_t, long), which may be (llong, long) on 32-bit ++# arches. We don't have llong as of this writing. ++typedef timespec = struct(long, long); ++int nanosleep(timespec*, timespec*); + + # unistd.h + void _exit(int); +diff --git a/etc/syscalls.conf b/etc/syscalls.conf +index 562f4e7..09d347d 100644 +--- a/etc/syscalls.conf ++++ b/etc/syscalls.conf +@@ -1,6 +1,10 @@ + # syscall.conf -- system call prototypes + # See ltrace.conf(5) for description of syntax of this file. + ++# Special value used to indicate the *at functions should use the ++# current working directory. ++typedef at_dirfd_t = enum[int](AT_FDCWD=-100); ++ + addr brk(addr); + int close(int); + int execve(string,addr,addr); +@@ -14,7 +18,7 @@ int getpid(); + addr mmap(addr,ulong,int,int,int,long); + + int munmap(addr,ulong); +-int open(string,int,octal); ++int open(string, hex(uint), oct(uint)); + int personality(uint); + long read(int,+string0,ulong); + int stat(string,addr); +@@ -113,3 +117,30 @@ ulong writev(int,addr,int); + int mprotect(addr,int,int); + int access(string,octal); + int getdents(uint, void *, uint); ++ ++int openat(at_dirfd_t, string, hex(uint), oct(uint)); ++int mknodat(at_dirfd_t, string, oct(uint), ushort) ++int mkdirat(at_dirfd_t, string, oct(uint)); ++int unlinkat(at_dirfd_t, string, hex(uint)); ++int symlinkat(string, at_dirfd_t, string); ++int linkat(at_dirfd_t, string, at_dirfd_t, string, hex(uint)); ++int renameat(at_dirfd_t, string, at_dirfd_t, string); ++int faccessat(at_dirfd_t, string, oct(uint), hex(uint)); ++int fchmodat(at_dirfd_t, string, oct(uint), hex(uint)); ++int fchownat(at_dirfd_t, string, int, int, hex(uint)); ++int readlinkat(at_dirfd_t, string, +string[arg4], ulong); ++int fstatat(at_dirfd_t, string, addr, hex(uint)); ++int utimensat(at_dirfd_t, string, addr, hex(uint)); ++int futimens(int, addr); ++int futimesat(at_dirfd_t, string, addr); ++addr shmat(int, addr, hex(uint)); ++int shmdt(addr); ++ ++typedef fid_type = enum(FILEID_ROOT=0, FILEID_INO32_GEN=1, FILEID_INO32_GEN_PARENT=2, FILEID_BTRFS_WITHOUT_PARENT=0x4d, FILEID_BTRFS_WITH_PARENT=0x4e, FILEID_BTRFS_WITH_PARENT_ROOT=0x4f, FILEID_UDF_WITHOUT_PARENT=0x51, FILEID_UDF_WITH_PARENT=0x52, FILEID_NILFS_WITHOUT_PARENT=0x61, FILEID_NILFS_WITH_PARENT=0x62); ++typedef file_handle = struct(uint, fid_type, array(hex(char), elt1)*); ++int name_to_handle_at(at_dirfd_t, string, file_handle, int*, hex(uint)); ++int open_by_handle_at(at_dirfd_t, file_handle, hex(uint)); ++ ++int newfstatat(at_dirfd_t, string, addr, hex(uint)); ++int creat(string, oct(int)); ++int ustat(ushort, addr); +diff --git a/sysdeps/linux-gnu/Makefile.am b/sysdeps/linux-gnu/Makefile.am +index ecee577..ec26162 100644 +--- a/sysdeps/linux-gnu/Makefile.am ++++ b/sysdeps/linux-gnu/Makefile.am +@@ -1,4 +1,5 @@ + # This file is part of ltrace. ++# Copyright (C) 2014 Petr Machata, Red Hat, Inc. + # Copyright (C) 2010,2012 Marc Kleine-Budde, Pengutronix + # + # This program is free software; you can redistribute it and/or +@@ -16,7 +17,8 @@ + # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + # 02110-1301 USA + +-DIST_SUBDIRS = alpha arm cris ia64 m68k metag mips ppc s390 sparc x86 ++DIST_SUBDIRS = aarch64 alpha arm cris ia64 m68k metag mips ppc s390 \ ++ sparc x86 + + SUBDIRS = \ + $(HOST_CPU) +diff --git a/sysdeps/linux-gnu/aarch64/Makefile.am b/sysdeps/linux-gnu/aarch64/Makefile.am +new file mode 100644 +index 0000000..0af4e6e +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/Makefile.am +@@ -0,0 +1,25 @@ ++# This file is part of ltrace. ++# Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of the ++# License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++# 02110-1301 USA ++ ++noinst_LTLIBRARIES = ../libcpu.la ++ ++___libcpu_la_SOURCES = fetch.c plt.c regs.c trace.c ++ ++noinst_HEADERS = arch.h ptrace.h signalent.h syscallent.h ++ ++MAINTAINERCLEANFILES = Makefile.in +diff --git a/sysdeps/linux-gnu/aarch64/arch.h b/sysdeps/linux-gnu/aarch64/arch.h +new file mode 100644 +index 0000000..4137613 +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/arch.h +@@ -0,0 +1,37 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++#ifndef LTRACE_AARCH64_ARCH_H ++#define LTRACE_AARCH64_ARCH_H ++ ++/* | 31 21 | 20 5 | 4 0 | * ++ * | 1 1 0 1 0 1 0 0 0 0 1 | imm16 | 0 0 0 0 0 | */ ++#define BREAKPOINT_VALUE { 0xd4, 0x20, 0, 0 } ++#define BREAKPOINT_LENGTH 4 ++#define DECR_PC_AFTER_BREAK 0 ++ ++#define LT_ELFCLASS ELFCLASS64 ++#define LT_ELF_MACHINE EM_AARCH64 ++ ++#define ARCH_HAVE_FETCH_ARG ++#define ARCH_ENDIAN_BIG ++#define ARCH_HAVE_SIZEOF ++#define ARCH_HAVE_ALIGNOF ++ ++#endif /* LTRACE_AARCH64_ARCH_H */ +diff --git a/sysdeps/linux-gnu/aarch64/fetch.c b/sysdeps/linux-gnu/aarch64/fetch.c +new file mode 100644 +index 0000000..8779f03 +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/fetch.c +@@ -0,0 +1,365 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++ ++#include "fetch.h" ++#include "proc.h" ++#include "type.h" ++#include "value.h" ++ ++int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs); ++int aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs); ++ ++ ++struct fetch_context ++{ ++ struct user_pt_regs gregs; ++ struct user_fpsimd_state fpregs; ++ arch_addr_t nsaa; ++ unsigned ngrn; ++ unsigned nsrn; ++ arch_addr_t x8; ++}; ++ ++static int ++context_init(struct fetch_context *context, struct process *proc) ++{ ++ if (aarch64_read_gregs(proc, &context->gregs) < 0 ++ || aarch64_read_fregs(proc, &context->fpregs) < 0) ++ return -1; ++ ++ context->ngrn = 0; ++ context->nsrn = 0; ++ /* XXX double cast */ ++ context->nsaa = (arch_addr_t) (uintptr_t) context->gregs.sp; ++ context->x8 = 0; ++ ++ return 0; ++} ++ ++struct fetch_context * ++arch_fetch_arg_clone(struct process *proc, struct fetch_context *context) ++{ ++ struct fetch_context *ret = malloc(sizeof(*ret)); ++ if (ret == NULL) ++ return NULL; ++ return memcpy(ret, context, sizeof(*ret)); ++} ++ ++static void ++fetch_next_gpr(struct fetch_context *context, unsigned char *buf) ++{ ++ uint64_t u = context->gregs.regs[context->ngrn++]; ++ memcpy(buf, &u, 8); ++} ++ ++static int ++fetch_gpr(struct fetch_context *context, struct value *value, size_t sz) ++{ ++ if (sz < 8) ++ sz = 8; ++ ++ unsigned char *buf = value_reserve(value, sz); ++ if (buf == NULL) ++ return -1; ++ ++ size_t i; ++ for (i = 0; i < sz; i += 8) ++ fetch_next_gpr(context, buf + i); ++ ++ return 0; ++} ++ ++static void ++fetch_next_sse(struct fetch_context *context, unsigned char *buf, size_t sz) ++{ ++ __int128 u = context->fpregs.vregs[context->nsrn++]; ++ memcpy(buf, &u, sz); ++} ++ ++static int ++fetch_sse(struct fetch_context *context, struct value *value, size_t sz) ++{ ++ unsigned char *buf = value_reserve(value, sz); ++ if (buf == NULL) ++ return -1; ++ ++ fetch_next_sse(context, buf, sz); ++ return 0; ++} ++ ++static int ++fetch_hfa(struct fetch_context *context, ++ struct value *value, struct arg_type_info *hfa_t, size_t count) ++{ ++ size_t sz = type_sizeof(value->inferior, hfa_t); ++ unsigned char *buf = value_reserve(value, sz * count); ++ if (buf == NULL) ++ return -1; ++ ++ size_t i; ++ for (i = 0; i < count; ++i) { ++ fetch_next_sse(context, buf, sz); ++ buf += sz; ++ } ++ return 0; ++} ++ ++static int ++fetch_stack(struct fetch_context *context, struct value *value, ++ size_t align, size_t sz) ++{ ++ if (align < 8) ++ align = 8; ++ size_t amount = ((sz + align - 1) / align) * align; ++ ++ /* XXX double casts */ ++ uintptr_t sp = (uintptr_t) context->nsaa; ++ sp = ((sp + align - 1) / align) * align; ++ ++ value_in_inferior(value, (arch_addr_t) sp); ++ ++ sp += amount; ++ context->nsaa = (arch_addr_t) sp; ++ ++ return 0; ++} ++ ++enum convert_method { ++ CVT_ERR = -1, ++ CVT_NOP = 0, ++ CVT_BYREF, ++}; ++ ++enum fetch_method { ++ FETCH_NOP, ++ FETCH_STACK, ++ FETCH_GPR, ++ FETCH_SSE, ++ FETCH_HFA, ++}; ++ ++struct fetch_script { ++ enum convert_method c; ++ enum fetch_method f; ++ size_t sz; ++ struct arg_type_info *hfa_t; ++ size_t count; ++}; ++ ++static struct fetch_script ++pass_arg(struct fetch_context const *context, ++ struct process *proc, struct arg_type_info *info) ++{ ++ enum fetch_method cvt = CVT_NOP; ++ ++ size_t sz = type_sizeof(proc, info); ++ if (sz == (size_t) -1) ++ return (struct fetch_script) { CVT_ERR, FETCH_NOP, sz }; ++ ++ switch (info->type) { ++ case ARGTYPE_VOID: ++ return (struct fetch_script) { cvt, FETCH_NOP, sz }; ++ ++ case ARGTYPE_STRUCT: ++ case ARGTYPE_ARRAY:; ++ size_t count; ++ struct arg_type_info *hfa_t = type_get_hfa_type(info, &count); ++ if (hfa_t != NULL && count <= 4) { ++ if (context->nsrn + count <= 8) ++ return (struct fetch_script) ++ { cvt, FETCH_HFA, sz, hfa_t, count }; ++ return (struct fetch_script) ++ { cvt, FETCH_STACK, sz, hfa_t, count }; ++ } ++ ++ if (sz <= 16) { ++ size_t count = sz / 8; ++ if (context->ngrn + count <= 8) ++ return (struct fetch_script) ++ { cvt, FETCH_GPR, sz }; ++ } ++ ++ cvt = CVT_BYREF; ++ sz = 8; ++ /* Fall through. */ ++ ++ case ARGTYPE_POINTER: ++ case ARGTYPE_INT: ++ case ARGTYPE_UINT: ++ case ARGTYPE_LONG: ++ case ARGTYPE_ULONG: ++ case ARGTYPE_CHAR: ++ case ARGTYPE_SHORT: ++ case ARGTYPE_USHORT: ++ if (context->ngrn < 8 && sz <= 8) ++ return (struct fetch_script) { cvt, FETCH_GPR, sz }; ++ /* We don't support types wider than 8 bytes as of ++ * now. */ ++ assert(sz <= 8); ++ ++ return (struct fetch_script) { cvt, FETCH_STACK, sz }; ++ ++ case ARGTYPE_FLOAT: ++ case ARGTYPE_DOUBLE: ++ if (context->nsrn < 8) { ++ /* ltrace doesn't support float128. */ ++ assert(sz <= 8); ++ return (struct fetch_script) { cvt, FETCH_SSE, sz }; ++ } ++ ++ return (struct fetch_script) { cvt, FETCH_STACK, sz }; ++ } ++ ++ assert(! "Failed to allocate argument."); ++ abort(); ++} ++ ++static int ++convert_arg(struct value *value, struct fetch_script how) ++{ ++ switch (how.c) { ++ case CVT_NOP: ++ return 0; ++ case CVT_BYREF: ++ return value_pass_by_reference(value); ++ case CVT_ERR: ++ return -1; ++ } ++ ++ assert(! "Don't know how to convert argument."); ++ abort(); ++} ++ ++static int ++fetch_arg(struct fetch_context *context, ++ struct process *proc, struct arg_type_info *info, ++ struct value *value, struct fetch_script how) ++{ ++ if (convert_arg(value, how) < 0) ++ return -1; ++ ++ switch (how.f) { ++ case FETCH_NOP: ++ return 0; ++ ++ case FETCH_STACK: ++ if (how.hfa_t != NULL && how.count != 0 && how.count <= 8) ++ context->nsrn = 8; ++ return fetch_stack(context, value, ++ type_alignof(proc, info), how.sz); ++ ++ case FETCH_GPR: ++ return fetch_gpr(context, value, how.sz); ++ ++ case FETCH_SSE: ++ return fetch_sse(context, value, how.sz); ++ ++ case FETCH_HFA: ++ return fetch_hfa(context, value, how.hfa_t, how.count); ++ } ++ ++ assert(! "Don't know how to fetch argument."); ++ abort(); ++} ++ ++struct fetch_context * ++arch_fetch_arg_init(enum tof type, struct process *proc, ++ struct arg_type_info *ret_info) ++{ ++ struct fetch_context *context = malloc(sizeof *context); ++ if (context == NULL || context_init(context, proc) < 0) { ++ fail: ++ free(context); ++ return NULL; ++ } ++ ++ /* There's a provision in ARMv8 parameter passing convention ++ * for returning types that, if passed as first argument to a ++ * function, would be passed on stack. For those types, x8 ++ * contains an address where the return argument should be ++ * placed. The callee doesn't need to preserve the value of ++ * x8, so we need to fetch it now. ++ * ++ * To my knowledge, there are currently no types where this ++ * holds, but the code is here, utterly untested. */ ++ ++ struct fetch_script how = pass_arg(context, proc, ret_info); ++ if (how.c == CVT_ERR) ++ goto fail; ++ if (how.c == CVT_NOP && how.f == FETCH_STACK) { ++ /* XXX double cast. */ ++ context->x8 = (arch_addr_t) (uintptr_t) context->gregs.regs[8]; ++ /* See the comment above about the assert. */ ++ assert(! "Unexpected: first argument passed on stack."); ++ abort(); ++ } ++ ++ return context; ++} ++ ++int ++arch_fetch_arg_next(struct fetch_context *context, enum tof type, ++ struct process *proc, struct arg_type_info *info, ++ struct value *value) ++{ ++ return fetch_arg(context, proc, info, value, ++ pass_arg(context, proc, info)); ++} ++ ++int ++arch_fetch_retval(struct fetch_context *context, enum tof type, ++ struct process *proc, struct arg_type_info *info, ++ struct value *value) ++{ ++ if (context->x8 != 0) { ++ value_in_inferior(value, context->x8); ++ return 0; ++ } ++ ++ if (context_init(context, proc) < 0) ++ return -1; ++ ++ return fetch_arg(context, proc, info, value, ++ pass_arg(context, proc, info)); ++} ++ ++void ++arch_fetch_arg_done(struct fetch_context *context) ++{ ++ if (context != NULL) ++ free(context); ++} ++ ++size_t ++arch_type_sizeof(struct process *proc, struct arg_type_info *arg) ++{ ++ return (size_t) -2; ++} ++ ++size_t ++arch_type_alignof(struct process *proc, struct arg_type_info *arg) ++{ ++ return (size_t) -2; ++} +diff --git a/sysdeps/linux-gnu/aarch64/plt.c b/sysdeps/linux-gnu/aarch64/plt.c +new file mode 100644 +index 0000000..29dc4c9 +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/plt.c +@@ -0,0 +1,38 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++ ++#include "backend.h" ++#include "proc.h" ++#include "library.h" ++#include "ltrace-elf.h" ++ ++arch_addr_t ++sym2addr(struct process *proc, struct library_symbol *sym) ++{ ++ return sym->enter_addr; ++} ++ ++GElf_Addr ++arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela) ++{ ++ return lte->plt_addr + 32 + ndx * 16; ++} +diff --git a/sysdeps/linux-gnu/aarch64/ptrace.h b/sysdeps/linux-gnu/aarch64/ptrace.h +new file mode 100644 +index 0000000..283c314 +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/ptrace.h +@@ -0,0 +1,22 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include +diff --git a/sysdeps/linux-gnu/aarch64/regs.c b/sysdeps/linux-gnu/aarch64/regs.c +new file mode 100644 +index 0000000..06eb72b +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/regs.c +@@ -0,0 +1,130 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++ ++#include "backend.h" ++#include "proc.h" ++ ++#define PC_OFF (32 * 4) ++ ++int ++aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs) ++{ ++ *regs = (struct user_pt_regs) {}; ++ struct iovec iovec; ++ iovec.iov_base = regs; ++ iovec.iov_len = sizeof *regs; ++ return ptrace(PTRACE_GETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0 ++ ? -1 : 0; ++} ++ ++int ++aarch64_write_gregs(struct process *proc, struct user_pt_regs *regs) ++{ ++ struct iovec iovec; ++ iovec.iov_base = regs; ++ iovec.iov_len = sizeof *regs; ++ return ptrace(PTRACE_SETREGSET, proc->pid, NT_PRSTATUS, &iovec) < 0 ++ ? -1 : 0; ++} ++ ++int ++aarch64_read_fregs(struct process *proc, struct user_fpsimd_state *regs) ++{ ++ *regs = (struct user_fpsimd_state) {}; ++ struct iovec iovec; ++ iovec.iov_base = regs; ++ iovec.iov_len = sizeof *regs; ++ return ptrace(PTRACE_GETREGSET, proc->pid, NT_FPREGSET, &iovec) < 0 ++ ? -1 : 0; ++} ++ ++arch_addr_t ++get_instruction_pointer(struct process *proc) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_instruction_pointer: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return 0; ++ } ++ ++ /* ++ char buf[128]; ++ sprintf(buf, "cat /proc/%d/maps", proc->pid); ++ system(buf); ++ */ ++ ++ /* XXX double cast */ ++ return (arch_addr_t) (uintptr_t) regs.pc; ++} ++ ++void ++set_instruction_pointer(struct process *proc, arch_addr_t addr) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_instruction_pointer: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return; ++ } ++ ++ /* XXX double cast */ ++ regs.pc = (uint64_t) (uintptr_t) addr; ++ ++ if (aarch64_write_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_instruction_pointer: " ++ "Couldn't write registers of %d.\n", proc->pid); ++ return; ++ } ++} ++ ++arch_addr_t ++get_stack_pointer(struct process *proc) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_stack_pointer: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return 0; ++ } ++ ++ /* XXX double cast */ ++ return (arch_addr_t) (uintptr_t) regs.sp; ++} ++ ++arch_addr_t ++get_return_addr(struct process *proc, arch_addr_t stack_pointer) ++{ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "get_return_addr: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return 0; ++ } ++ ++ /* XXX double cast */ ++ return (arch_addr_t) (uintptr_t) regs.regs[30]; ++} +diff --git a/sysdeps/linux-gnu/aarch64/signalent.h b/sysdeps/linux-gnu/aarch64/signalent.h +new file mode 100644 +index 0000000..bf56ebc +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/signalent.h +@@ -0,0 +1,52 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2006 Ian Wienand ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++ "SIG_0", /* 0 */ ++ "SIGHUP", /* 1 */ ++ "SIGINT", /* 2 */ ++ "SIGQUIT", /* 3 */ ++ "SIGILL", /* 4 */ ++ "SIGTRAP", /* 5 */ ++ "SIGABRT", /* 6 */ ++ "SIGBUS", /* 7 */ ++ "SIGFPE", /* 8 */ ++ "SIGKILL", /* 9 */ ++ "SIGUSR1", /* 10 */ ++ "SIGSEGV", /* 11 */ ++ "SIGUSR2", /* 12 */ ++ "SIGPIPE", /* 13 */ ++ "SIGALRM", /* 14 */ ++ "SIGTERM", /* 15 */ ++ "SIGSTKFLT", /* 16 */ ++ "SIGCHLD", /* 17 */ ++ "SIGCONT", /* 18 */ ++ "SIGSTOP", /* 19 */ ++ "SIGTSTP", /* 20 */ ++ "SIGTTIN", /* 21 */ ++ "SIGTTOU", /* 22 */ ++ "SIGURG", /* 23 */ ++ "SIGXCPU", /* 24 */ ++ "SIGXFSZ", /* 25 */ ++ "SIGVTALRM", /* 26 */ ++ "SIGPROF", /* 27 */ ++ "SIGWINCH", /* 28 */ ++ "SIGIO", /* 29 */ ++ "SIGPWR", /* 30 */ ++ "SIGSYS", /* 31 */ +diff --git a/sysdeps/linux-gnu/aarch64/syscallent.h b/sysdeps/linux-gnu/aarch64/syscallent.h +new file mode 100644 +index 0000000..aca8191 +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/syscallent.h +@@ -0,0 +1,1100 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++ "io_setup", /* 0 */ ++ "io_destroy", /* 1 */ ++ "io_submit", /* 2 */ ++ "io_cancel", /* 3 */ ++ "io_getevents", /* 4 */ ++ "setxattr", /* 5 */ ++ "lsetxattr", /* 6 */ ++ "fsetxattr", /* 7 */ ++ "getxattr", /* 8 */ ++ "lgetxattr", /* 9 */ ++ "fgetxattr", /* 10 */ ++ "listxattr", /* 11 */ ++ "llistxattr", /* 12 */ ++ "flistxattr", /* 13 */ ++ "removexattr", /* 14 */ ++ "lremovexattr", /* 15 */ ++ "fremovexattr", /* 16 */ ++ "getcwd", /* 17 */ ++ "lookup_dcookie", /* 18 */ ++ "eventfd2", /* 19 */ ++ "epoll_create1", /* 20 */ ++ "epoll_ctl", /* 21 */ ++ "epoll_pwait", /* 22 */ ++ "dup", /* 23 */ ++ "dup3", /* 24 */ ++ "fcntl", /* 25 */ ++ "inotify_init1", /* 26 */ ++ "inotify_add_watch", /* 27 */ ++ "inotify_rm_watch", /* 28 */ ++ "ioctl", /* 29 */ ++ "ioprio_set", /* 30 */ ++ "ioprio_get", /* 31 */ ++ "flock", /* 32 */ ++ "mknodat", /* 33 */ ++ "mkdirat", /* 34 */ ++ "unlinkat", /* 35 */ ++ "symlinkat", /* 36 */ ++ "linkat", /* 37 */ ++ "renameat", /* 38 */ ++ "umount2", /* 39 */ ++ "mount", /* 40 */ ++ "pivot_root", /* 41 */ ++ "nfsservctl", /* 42 */ ++ "statfs", /* 43 */ ++ "fstatfs", /* 44 */ ++ "truncate", /* 45 */ ++ "ftruncate", /* 46 */ ++ "fallocate", /* 47 */ ++ "faccessat", /* 48 */ ++ "chdir", /* 49 */ ++ "fchdir", /* 50 */ ++ "chroot", /* 51 */ ++ "fchmod", /* 52 */ ++ "fchmodat", /* 53 */ ++ "fchownat", /* 54 */ ++ "fchown", /* 55 */ ++ "openat", /* 56 */ ++ "close", /* 57 */ ++ "vhangup", /* 58 */ ++ "pipe2", /* 59 */ ++ "quotactl", /* 60 */ ++ "getdents64", /* 61 */ ++ "lseek", /* 62 */ ++ "read", /* 63 */ ++ "write", /* 64 */ ++ "readv", /* 65 */ ++ "writev", /* 66 */ ++ "pread64", /* 67 */ ++ "pwrite64", /* 68 */ ++ "preadv", /* 69 */ ++ "pwritev", /* 70 */ ++ "sendfile", /* 71 */ ++ "pselect6", /* 72 */ ++ "ppoll", /* 73 */ ++ "signalfd4", /* 74 */ ++ "vmsplice", /* 75 */ ++ "splice", /* 76 */ ++ "tee", /* 77 */ ++ "readlinkat", /* 78 */ ++ "fstatat", /* 79 */ ++ "fstat", /* 80 */ ++ "sync", /* 81 */ ++ "fsync", /* 82 */ ++ "fdatasync", /* 83 */ ++ "sync_file_range", /* 84 */ ++ "timerfd_create", /* 85 */ ++ "timerfd_settime", /* 86 */ ++ "timerfd_gettime", /* 87 */ ++ "utimensat", /* 88 */ ++ "acct", /* 89 */ ++ "capget", /* 90 */ ++ "capset", /* 91 */ ++ "personality", /* 92 */ ++ "exit", /* 93 */ ++ "exit_group", /* 94 */ ++ "waitid", /* 95 */ ++ "set_tid_address", /* 96 */ ++ "unshare", /* 97 */ ++ "futex", /* 98 */ ++ "set_robust_list", /* 99 */ ++ "get_robust_list", /* 100 */ ++ "nanosleep", /* 101 */ ++ "getitimer", /* 102 */ ++ "setitimer", /* 103 */ ++ "kexec_load", /* 104 */ ++ "init_module", /* 105 */ ++ "delete_module", /* 106 */ ++ "timer_create", /* 107 */ ++ "timer_gettime", /* 108 */ ++ "timer_getoverrun", /* 109 */ ++ "timer_settime", /* 110 */ ++ "timer_delete", /* 111 */ ++ "clock_settime", /* 112 */ ++ "clock_gettime", /* 113 */ ++ "clock_getres", /* 114 */ ++ "clock_nanosleep", /* 115 */ ++ "syslog", /* 116 */ ++ "ptrace", /* 117 */ ++ "sched_setparam", /* 118 */ ++ "sched_setscheduler", /* 119 */ ++ "sched_getscheduler", /* 120 */ ++ "sched_getparam", /* 121 */ ++ "sched_setaffinity", /* 122 */ ++ "sched_getaffinity", /* 123 */ ++ "sched_yield", /* 124 */ ++ "sched_get_priority_max", /* 125 */ ++ "sched_get_priority_min", /* 126 */ ++ "sched_rr_get_interval", /* 127 */ ++ "restart_syscall", /* 128 */ ++ "kill", /* 129 */ ++ "tkill", /* 130 */ ++ "tgkill", /* 131 */ ++ "sigaltstack", /* 132 */ ++ "rt_sigsuspend", /* 133 */ ++ "rt_sigaction", /* 134 */ ++ "rt_sigprocmask", /* 135 */ ++ "rt_sigpending", /* 136 */ ++ "rt_sigtimedwait", /* 137 */ ++ "rt_sigqueueinfo", /* 138 */ ++ "rt_sigreturn", /* 139 */ ++ "setpriority", /* 140 */ ++ "getpriority", /* 141 */ ++ "reboot", /* 142 */ ++ "setregid", /* 143 */ ++ "setgid", /* 144 */ ++ "setreuid", /* 145 */ ++ "setuid", /* 146 */ ++ "setresuid", /* 147 */ ++ "getresuid", /* 148 */ ++ "setresgid", /* 149 */ ++ "getresgid", /* 150 */ ++ "setfsuid", /* 151 */ ++ "setfsgid", /* 152 */ ++ "times", /* 153 */ ++ "setpgid", /* 154 */ ++ "getpgid", /* 155 */ ++ "getsid", /* 156 */ ++ "setsid", /* 157 */ ++ "getgroups", /* 158 */ ++ "setgroups", /* 159 */ ++ "uname", /* 160 */ ++ "sethostname", /* 161 */ ++ "setdomainname", /* 162 */ ++ "getrlimit", /* 163 */ ++ "setrlimit", /* 164 */ ++ "getrusage", /* 165 */ ++ "umask", /* 166 */ ++ "prctl", /* 167 */ ++ "getcpu", /* 168 */ ++ "gettimeofday", /* 169 */ ++ "settimeofday", /* 170 */ ++ "adjtimex", /* 171 */ ++ "getpid", /* 172 */ ++ "getppid", /* 173 */ ++ "getuid", /* 174 */ ++ "geteuid", /* 175 */ ++ "getgid", /* 176 */ ++ "getegid", /* 177 */ ++ "gettid", /* 178 */ ++ "sysinfo", /* 179 */ ++ "mq_open", /* 180 */ ++ "mq_unlink", /* 181 */ ++ "mq_timedsend", /* 182 */ ++ "mq_timedreceive", /* 183 */ ++ "mq_notify", /* 184 */ ++ "mq_getsetattr", /* 185 */ ++ "msgget", /* 186 */ ++ "msgctl", /* 187 */ ++ "msgrcv", /* 188 */ ++ "msgsnd", /* 189 */ ++ "semget", /* 190 */ ++ "semctl", /* 191 */ ++ "semtimedop", /* 192 */ ++ "semop", /* 193 */ ++ "shmget", /* 194 */ ++ "shmctl", /* 195 */ ++ "shmat", /* 196 */ ++ "shmdt", /* 197 */ ++ "socket", /* 198 */ ++ "socketpair", /* 199 */ ++ "bind", /* 200 */ ++ "listen", /* 201 */ ++ "accept", /* 202 */ ++ "connect", /* 203 */ ++ "getsockname", /* 204 */ ++ "getpeername", /* 205 */ ++ "sendto", /* 206 */ ++ "recvfrom", /* 207 */ ++ "setsockopt", /* 208 */ ++ "getsockopt", /* 209 */ ++ "shutdown", /* 210 */ ++ "sendmsg", /* 211 */ ++ "recvmsg", /* 212 */ ++ "readahead", /* 213 */ ++ "brk", /* 214 */ ++ "munmap", /* 215 */ ++ "mremap", /* 216 */ ++ "add_key", /* 217 */ ++ "request_key", /* 218 */ ++ "keyctl", /* 219 */ ++ "clone", /* 220 */ ++ "execve", /* 221 */ ++ "mmap", /* 222 */ ++ "fadvise64", /* 223 */ ++ "swapon", /* 224 */ ++ "swapoff", /* 225 */ ++ "mprotect", /* 226 */ ++ "msync", /* 227 */ ++ "mlock", /* 228 */ ++ "munlock", /* 229 */ ++ "mlockall", /* 230 */ ++ "munlockall", /* 231 */ ++ "mincore", /* 232 */ ++ "madvise", /* 233 */ ++ "remap_file_pages", /* 234 */ ++ "mbind", /* 235 */ ++ "get_mempolicy", /* 236 */ ++ "set_mempolicy", /* 237 */ ++ "migrate_pages", /* 238 */ ++ "move_pages", /* 239 */ ++ "rt_tgsigqueueinfo", /* 240 */ ++ "perf_event_open", /* 241 */ ++ "accept4", /* 242 */ ++ "recvmmsg", /* 243 */ ++ "arch_specific_syscall", /* 244 */ ++ "245", /* 245 */ ++ "246", /* 246 */ ++ "247", /* 247 */ ++ "248", /* 248 */ ++ "249", /* 249 */ ++ "250", /* 250 */ ++ "251", /* 251 */ ++ "252", /* 252 */ ++ "253", /* 253 */ ++ "254", /* 254 */ ++ "255", /* 255 */ ++ "256", /* 256 */ ++ "257", /* 257 */ ++ "258", /* 258 */ ++ "259", /* 259 */ ++ "wait4", /* 260 */ ++ "prlimit64", /* 261 */ ++ "fanotify_init", /* 262 */ ++ "fanotify_mark", /* 263 */ ++ "name_to_handle_at", /* 264 */ ++ "open_by_handle_at", /* 265 */ ++ "clock_adjtime", /* 266 */ ++ "syncfs", /* 267 */ ++ "setns", /* 268 */ ++ "sendmmsg", /* 269 */ ++ "process_vm_readv", /* 270 */ ++ "process_vm_writev", /* 271 */ ++ "kcmp", /* 272 */ ++ "finit_module", /* 273 */ ++ "syscalls", /* 274 */ ++ "275", /* 275 */ ++ "276", /* 276 */ ++ "277", /* 277 */ ++ "278", /* 278 */ ++ "279", /* 279 */ ++ "280", /* 280 */ ++ "281", /* 281 */ ++ "282", /* 282 */ ++ "283", /* 283 */ ++ "284", /* 284 */ ++ "285", /* 285 */ ++ "286", /* 286 */ ++ "287", /* 287 */ ++ "288", /* 288 */ ++ "289", /* 289 */ ++ "290", /* 290 */ ++ "291", /* 291 */ ++ "292", /* 292 */ ++ "293", /* 293 */ ++ "294", /* 294 */ ++ "295", /* 295 */ ++ "296", /* 296 */ ++ "297", /* 297 */ ++ "298", /* 298 */ ++ "299", /* 299 */ ++ "300", /* 300 */ ++ "301", /* 301 */ ++ "302", /* 302 */ ++ "303", /* 303 */ ++ "304", /* 304 */ ++ "305", /* 305 */ ++ "306", /* 306 */ ++ "307", /* 307 */ ++ "308", /* 308 */ ++ "309", /* 309 */ ++ "310", /* 310 */ ++ "311", /* 311 */ ++ "312", /* 312 */ ++ "313", /* 313 */ ++ "314", /* 314 */ ++ "315", /* 315 */ ++ "316", /* 316 */ ++ "317", /* 317 */ ++ "318", /* 318 */ ++ "319", /* 319 */ ++ "320", /* 320 */ ++ "321", /* 321 */ ++ "322", /* 322 */ ++ "323", /* 323 */ ++ "324", /* 324 */ ++ "325", /* 325 */ ++ "326", /* 326 */ ++ "327", /* 327 */ ++ "328", /* 328 */ ++ "329", /* 329 */ ++ "330", /* 330 */ ++ "331", /* 331 */ ++ "332", /* 332 */ ++ "333", /* 333 */ ++ "334", /* 334 */ ++ "335", /* 335 */ ++ "336", /* 336 */ ++ "337", /* 337 */ ++ "338", /* 338 */ ++ "339", /* 339 */ ++ "340", /* 340 */ ++ "341", /* 341 */ ++ "342", /* 342 */ ++ "343", /* 343 */ ++ "344", /* 344 */ ++ "345", /* 345 */ ++ "346", /* 346 */ ++ "347", /* 347 */ ++ "348", /* 348 */ ++ "349", /* 349 */ ++ "350", /* 350 */ ++ "351", /* 351 */ ++ "352", /* 352 */ ++ "353", /* 353 */ ++ "354", /* 354 */ ++ "355", /* 355 */ ++ "356", /* 356 */ ++ "357", /* 357 */ ++ "358", /* 358 */ ++ "359", /* 359 */ ++ "360", /* 360 */ ++ "361", /* 361 */ ++ "362", /* 362 */ ++ "363", /* 363 */ ++ "364", /* 364 */ ++ "365", /* 365 */ ++ "366", /* 366 */ ++ "367", /* 367 */ ++ "368", /* 368 */ ++ "369", /* 369 */ ++ "370", /* 370 */ ++ "371", /* 371 */ ++ "372", /* 372 */ ++ "373", /* 373 */ ++ "374", /* 374 */ ++ "375", /* 375 */ ++ "376", /* 376 */ ++ "377", /* 377 */ ++ "378", /* 378 */ ++ "379", /* 379 */ ++ "380", /* 380 */ ++ "381", /* 381 */ ++ "382", /* 382 */ ++ "383", /* 383 */ ++ "384", /* 384 */ ++ "385", /* 385 */ ++ "386", /* 386 */ ++ "387", /* 387 */ ++ "388", /* 388 */ ++ "389", /* 389 */ ++ "390", /* 390 */ ++ "391", /* 391 */ ++ "392", /* 392 */ ++ "393", /* 393 */ ++ "394", /* 394 */ ++ "395", /* 395 */ ++ "396", /* 396 */ ++ "397", /* 397 */ ++ "398", /* 398 */ ++ "399", /* 399 */ ++ "400", /* 400 */ ++ "401", /* 401 */ ++ "402", /* 402 */ ++ "403", /* 403 */ ++ "404", /* 404 */ ++ "405", /* 405 */ ++ "406", /* 406 */ ++ "407", /* 407 */ ++ "408", /* 408 */ ++ "409", /* 409 */ ++ "410", /* 410 */ ++ "411", /* 411 */ ++ "412", /* 412 */ ++ "413", /* 413 */ ++ "414", /* 414 */ ++ "415", /* 415 */ ++ "416", /* 416 */ ++ "417", /* 417 */ ++ "418", /* 418 */ ++ "419", /* 419 */ ++ "420", /* 420 */ ++ "421", /* 421 */ ++ "422", /* 422 */ ++ "423", /* 423 */ ++ "424", /* 424 */ ++ "425", /* 425 */ ++ "426", /* 426 */ ++ "427", /* 427 */ ++ "428", /* 428 */ ++ "429", /* 429 */ ++ "430", /* 430 */ ++ "431", /* 431 */ ++ "432", /* 432 */ ++ "433", /* 433 */ ++ "434", /* 434 */ ++ "435", /* 435 */ ++ "436", /* 436 */ ++ "437", /* 437 */ ++ "438", /* 438 */ ++ "439", /* 439 */ ++ "440", /* 440 */ ++ "441", /* 441 */ ++ "442", /* 442 */ ++ "443", /* 443 */ ++ "444", /* 444 */ ++ "445", /* 445 */ ++ "446", /* 446 */ ++ "447", /* 447 */ ++ "448", /* 448 */ ++ "449", /* 449 */ ++ "450", /* 450 */ ++ "451", /* 451 */ ++ "452", /* 452 */ ++ "453", /* 453 */ ++ "454", /* 454 */ ++ "455", /* 455 */ ++ "456", /* 456 */ ++ "457", /* 457 */ ++ "458", /* 458 */ ++ "459", /* 459 */ ++ "460", /* 460 */ ++ "461", /* 461 */ ++ "462", /* 462 */ ++ "463", /* 463 */ ++ "464", /* 464 */ ++ "465", /* 465 */ ++ "466", /* 466 */ ++ "467", /* 467 */ ++ "468", /* 468 */ ++ "469", /* 469 */ ++ "470", /* 470 */ ++ "471", /* 471 */ ++ "472", /* 472 */ ++ "473", /* 473 */ ++ "474", /* 474 */ ++ "475", /* 475 */ ++ "476", /* 476 */ ++ "477", /* 477 */ ++ "478", /* 478 */ ++ "479", /* 479 */ ++ "480", /* 480 */ ++ "481", /* 481 */ ++ "482", /* 482 */ ++ "483", /* 483 */ ++ "484", /* 484 */ ++ "485", /* 485 */ ++ "486", /* 486 */ ++ "487", /* 487 */ ++ "488", /* 488 */ ++ "489", /* 489 */ ++ "490", /* 490 */ ++ "491", /* 491 */ ++ "492", /* 492 */ ++ "493", /* 493 */ ++ "494", /* 494 */ ++ "495", /* 495 */ ++ "496", /* 496 */ ++ "497", /* 497 */ ++ "498", /* 498 */ ++ "499", /* 499 */ ++ "500", /* 500 */ ++ "501", /* 501 */ ++ "502", /* 502 */ ++ "503", /* 503 */ ++ "504", /* 504 */ ++ "505", /* 505 */ ++ "506", /* 506 */ ++ "507", /* 507 */ ++ "508", /* 508 */ ++ "509", /* 509 */ ++ "510", /* 510 */ ++ "511", /* 511 */ ++ "512", /* 512 */ ++ "513", /* 513 */ ++ "514", /* 514 */ ++ "515", /* 515 */ ++ "516", /* 516 */ ++ "517", /* 517 */ ++ "518", /* 518 */ ++ "519", /* 519 */ ++ "520", /* 520 */ ++ "521", /* 521 */ ++ "522", /* 522 */ ++ "523", /* 523 */ ++ "524", /* 524 */ ++ "525", /* 525 */ ++ "526", /* 526 */ ++ "527", /* 527 */ ++ "528", /* 528 */ ++ "529", /* 529 */ ++ "530", /* 530 */ ++ "531", /* 531 */ ++ "532", /* 532 */ ++ "533", /* 533 */ ++ "534", /* 534 */ ++ "535", /* 535 */ ++ "536", /* 536 */ ++ "537", /* 537 */ ++ "538", /* 538 */ ++ "539", /* 539 */ ++ "540", /* 540 */ ++ "541", /* 541 */ ++ "542", /* 542 */ ++ "543", /* 543 */ ++ "544", /* 544 */ ++ "545", /* 545 */ ++ "546", /* 546 */ ++ "547", /* 547 */ ++ "548", /* 548 */ ++ "549", /* 549 */ ++ "550", /* 550 */ ++ "551", /* 551 */ ++ "552", /* 552 */ ++ "553", /* 553 */ ++ "554", /* 554 */ ++ "555", /* 555 */ ++ "556", /* 556 */ ++ "557", /* 557 */ ++ "558", /* 558 */ ++ "559", /* 559 */ ++ "560", /* 560 */ ++ "561", /* 561 */ ++ "562", /* 562 */ ++ "563", /* 563 */ ++ "564", /* 564 */ ++ "565", /* 565 */ ++ "566", /* 566 */ ++ "567", /* 567 */ ++ "568", /* 568 */ ++ "569", /* 569 */ ++ "570", /* 570 */ ++ "571", /* 571 */ ++ "572", /* 572 */ ++ "573", /* 573 */ ++ "574", /* 574 */ ++ "575", /* 575 */ ++ "576", /* 576 */ ++ "577", /* 577 */ ++ "578", /* 578 */ ++ "579", /* 579 */ ++ "580", /* 580 */ ++ "581", /* 581 */ ++ "582", /* 582 */ ++ "583", /* 583 */ ++ "584", /* 584 */ ++ "585", /* 585 */ ++ "586", /* 586 */ ++ "587", /* 587 */ ++ "588", /* 588 */ ++ "589", /* 589 */ ++ "590", /* 590 */ ++ "591", /* 591 */ ++ "592", /* 592 */ ++ "593", /* 593 */ ++ "594", /* 594 */ ++ "595", /* 595 */ ++ "596", /* 596 */ ++ "597", /* 597 */ ++ "598", /* 598 */ ++ "599", /* 599 */ ++ "600", /* 600 */ ++ "601", /* 601 */ ++ "602", /* 602 */ ++ "603", /* 603 */ ++ "604", /* 604 */ ++ "605", /* 605 */ ++ "606", /* 606 */ ++ "607", /* 607 */ ++ "608", /* 608 */ ++ "609", /* 609 */ ++ "610", /* 610 */ ++ "611", /* 611 */ ++ "612", /* 612 */ ++ "613", /* 613 */ ++ "614", /* 614 */ ++ "615", /* 615 */ ++ "616", /* 616 */ ++ "617", /* 617 */ ++ "618", /* 618 */ ++ "619", /* 619 */ ++ "620", /* 620 */ ++ "621", /* 621 */ ++ "622", /* 622 */ ++ "623", /* 623 */ ++ "624", /* 624 */ ++ "625", /* 625 */ ++ "626", /* 626 */ ++ "627", /* 627 */ ++ "628", /* 628 */ ++ "629", /* 629 */ ++ "630", /* 630 */ ++ "631", /* 631 */ ++ "632", /* 632 */ ++ "633", /* 633 */ ++ "634", /* 634 */ ++ "635", /* 635 */ ++ "636", /* 636 */ ++ "637", /* 637 */ ++ "638", /* 638 */ ++ "639", /* 639 */ ++ "640", /* 640 */ ++ "641", /* 641 */ ++ "642", /* 642 */ ++ "643", /* 643 */ ++ "644", /* 644 */ ++ "645", /* 645 */ ++ "646", /* 646 */ ++ "647", /* 647 */ ++ "648", /* 648 */ ++ "649", /* 649 */ ++ "650", /* 650 */ ++ "651", /* 651 */ ++ "652", /* 652 */ ++ "653", /* 653 */ ++ "654", /* 654 */ ++ "655", /* 655 */ ++ "656", /* 656 */ ++ "657", /* 657 */ ++ "658", /* 658 */ ++ "659", /* 659 */ ++ "660", /* 660 */ ++ "661", /* 661 */ ++ "662", /* 662 */ ++ "663", /* 663 */ ++ "664", /* 664 */ ++ "665", /* 665 */ ++ "666", /* 666 */ ++ "667", /* 667 */ ++ "668", /* 668 */ ++ "669", /* 669 */ ++ "670", /* 670 */ ++ "671", /* 671 */ ++ "672", /* 672 */ ++ "673", /* 673 */ ++ "674", /* 674 */ ++ "675", /* 675 */ ++ "676", /* 676 */ ++ "677", /* 677 */ ++ "678", /* 678 */ ++ "679", /* 679 */ ++ "680", /* 680 */ ++ "681", /* 681 */ ++ "682", /* 682 */ ++ "683", /* 683 */ ++ "684", /* 684 */ ++ "685", /* 685 */ ++ "686", /* 686 */ ++ "687", /* 687 */ ++ "688", /* 688 */ ++ "689", /* 689 */ ++ "690", /* 690 */ ++ "691", /* 691 */ ++ "692", /* 692 */ ++ "693", /* 693 */ ++ "694", /* 694 */ ++ "695", /* 695 */ ++ "696", /* 696 */ ++ "697", /* 697 */ ++ "698", /* 698 */ ++ "699", /* 699 */ ++ "700", /* 700 */ ++ "701", /* 701 */ ++ "702", /* 702 */ ++ "703", /* 703 */ ++ "704", /* 704 */ ++ "705", /* 705 */ ++ "706", /* 706 */ ++ "707", /* 707 */ ++ "708", /* 708 */ ++ "709", /* 709 */ ++ "710", /* 710 */ ++ "711", /* 711 */ ++ "712", /* 712 */ ++ "713", /* 713 */ ++ "714", /* 714 */ ++ "715", /* 715 */ ++ "716", /* 716 */ ++ "717", /* 717 */ ++ "718", /* 718 */ ++ "719", /* 719 */ ++ "720", /* 720 */ ++ "721", /* 721 */ ++ "722", /* 722 */ ++ "723", /* 723 */ ++ "724", /* 724 */ ++ "725", /* 725 */ ++ "726", /* 726 */ ++ "727", /* 727 */ ++ "728", /* 728 */ ++ "729", /* 729 */ ++ "730", /* 730 */ ++ "731", /* 731 */ ++ "732", /* 732 */ ++ "733", /* 733 */ ++ "734", /* 734 */ ++ "735", /* 735 */ ++ "736", /* 736 */ ++ "737", /* 737 */ ++ "738", /* 738 */ ++ "739", /* 739 */ ++ "740", /* 740 */ ++ "741", /* 741 */ ++ "742", /* 742 */ ++ "743", /* 743 */ ++ "744", /* 744 */ ++ "745", /* 745 */ ++ "746", /* 746 */ ++ "747", /* 747 */ ++ "748", /* 748 */ ++ "749", /* 749 */ ++ "750", /* 750 */ ++ "751", /* 751 */ ++ "752", /* 752 */ ++ "753", /* 753 */ ++ "754", /* 754 */ ++ "755", /* 755 */ ++ "756", /* 756 */ ++ "757", /* 757 */ ++ "758", /* 758 */ ++ "759", /* 759 */ ++ "760", /* 760 */ ++ "761", /* 761 */ ++ "762", /* 762 */ ++ "763", /* 763 */ ++ "764", /* 764 */ ++ "765", /* 765 */ ++ "766", /* 766 */ ++ "767", /* 767 */ ++ "768", /* 768 */ ++ "769", /* 769 */ ++ "770", /* 770 */ ++ "771", /* 771 */ ++ "772", /* 772 */ ++ "773", /* 773 */ ++ "774", /* 774 */ ++ "775", /* 775 */ ++ "776", /* 776 */ ++ "777", /* 777 */ ++ "778", /* 778 */ ++ "779", /* 779 */ ++ "780", /* 780 */ ++ "781", /* 781 */ ++ "782", /* 782 */ ++ "783", /* 783 */ ++ "784", /* 784 */ ++ "785", /* 785 */ ++ "786", /* 786 */ ++ "787", /* 787 */ ++ "788", /* 788 */ ++ "789", /* 789 */ ++ "790", /* 790 */ ++ "791", /* 791 */ ++ "792", /* 792 */ ++ "793", /* 793 */ ++ "794", /* 794 */ ++ "795", /* 795 */ ++ "796", /* 796 */ ++ "797", /* 797 */ ++ "798", /* 798 */ ++ "799", /* 799 */ ++ "800", /* 800 */ ++ "801", /* 801 */ ++ "802", /* 802 */ ++ "803", /* 803 */ ++ "804", /* 804 */ ++ "805", /* 805 */ ++ "806", /* 806 */ ++ "807", /* 807 */ ++ "808", /* 808 */ ++ "809", /* 809 */ ++ "810", /* 810 */ ++ "811", /* 811 */ ++ "812", /* 812 */ ++ "813", /* 813 */ ++ "814", /* 814 */ ++ "815", /* 815 */ ++ "816", /* 816 */ ++ "817", /* 817 */ ++ "818", /* 818 */ ++ "819", /* 819 */ ++ "820", /* 820 */ ++ "821", /* 821 */ ++ "822", /* 822 */ ++ "823", /* 823 */ ++ "824", /* 824 */ ++ "825", /* 825 */ ++ "826", /* 826 */ ++ "827", /* 827 */ ++ "828", /* 828 */ ++ "829", /* 829 */ ++ "830", /* 830 */ ++ "831", /* 831 */ ++ "832", /* 832 */ ++ "833", /* 833 */ ++ "834", /* 834 */ ++ "835", /* 835 */ ++ "836", /* 836 */ ++ "837", /* 837 */ ++ "838", /* 838 */ ++ "839", /* 839 */ ++ "840", /* 840 */ ++ "841", /* 841 */ ++ "842", /* 842 */ ++ "843", /* 843 */ ++ "844", /* 844 */ ++ "845", /* 845 */ ++ "846", /* 846 */ ++ "847", /* 847 */ ++ "848", /* 848 */ ++ "849", /* 849 */ ++ "850", /* 850 */ ++ "851", /* 851 */ ++ "852", /* 852 */ ++ "853", /* 853 */ ++ "854", /* 854 */ ++ "855", /* 855 */ ++ "856", /* 856 */ ++ "857", /* 857 */ ++ "858", /* 858 */ ++ "859", /* 859 */ ++ "860", /* 860 */ ++ "861", /* 861 */ ++ "862", /* 862 */ ++ "863", /* 863 */ ++ "864", /* 864 */ ++ "865", /* 865 */ ++ "866", /* 866 */ ++ "867", /* 867 */ ++ "868", /* 868 */ ++ "869", /* 869 */ ++ "870", /* 870 */ ++ "871", /* 871 */ ++ "872", /* 872 */ ++ "873", /* 873 */ ++ "874", /* 874 */ ++ "875", /* 875 */ ++ "876", /* 876 */ ++ "877", /* 877 */ ++ "878", /* 878 */ ++ "879", /* 879 */ ++ "880", /* 880 */ ++ "881", /* 881 */ ++ "882", /* 882 */ ++ "883", /* 883 */ ++ "884", /* 884 */ ++ "885", /* 885 */ ++ "886", /* 886 */ ++ "887", /* 887 */ ++ "888", /* 888 */ ++ "889", /* 889 */ ++ "890", /* 890 */ ++ "891", /* 891 */ ++ "892", /* 892 */ ++ "893", /* 893 */ ++ "894", /* 894 */ ++ "895", /* 895 */ ++ "896", /* 896 */ ++ "897", /* 897 */ ++ "898", /* 898 */ ++ "899", /* 899 */ ++ "900", /* 900 */ ++ "901", /* 901 */ ++ "902", /* 902 */ ++ "903", /* 903 */ ++ "904", /* 904 */ ++ "905", /* 905 */ ++ "906", /* 906 */ ++ "907", /* 907 */ ++ "908", /* 908 */ ++ "909", /* 909 */ ++ "910", /* 910 */ ++ "911", /* 911 */ ++ "912", /* 912 */ ++ "913", /* 913 */ ++ "914", /* 914 */ ++ "915", /* 915 */ ++ "916", /* 916 */ ++ "917", /* 917 */ ++ "918", /* 918 */ ++ "919", /* 919 */ ++ "920", /* 920 */ ++ "921", /* 921 */ ++ "922", /* 922 */ ++ "923", /* 923 */ ++ "924", /* 924 */ ++ "925", /* 925 */ ++ "926", /* 926 */ ++ "927", /* 927 */ ++ "928", /* 928 */ ++ "929", /* 929 */ ++ "930", /* 930 */ ++ "931", /* 931 */ ++ "932", /* 932 */ ++ "933", /* 933 */ ++ "934", /* 934 */ ++ "935", /* 935 */ ++ "936", /* 936 */ ++ "937", /* 937 */ ++ "938", /* 938 */ ++ "939", /* 939 */ ++ "940", /* 940 */ ++ "941", /* 941 */ ++ "942", /* 942 */ ++ "943", /* 943 */ ++ "944", /* 944 */ ++ "945", /* 945 */ ++ "946", /* 946 */ ++ "947", /* 947 */ ++ "948", /* 948 */ ++ "949", /* 949 */ ++ "950", /* 950 */ ++ "951", /* 951 */ ++ "952", /* 952 */ ++ "953", /* 953 */ ++ "954", /* 954 */ ++ "955", /* 955 */ ++ "956", /* 956 */ ++ "957", /* 957 */ ++ "958", /* 958 */ ++ "959", /* 959 */ ++ "960", /* 960 */ ++ "961", /* 961 */ ++ "962", /* 962 */ ++ "963", /* 963 */ ++ "964", /* 964 */ ++ "965", /* 965 */ ++ "966", /* 966 */ ++ "967", /* 967 */ ++ "968", /* 968 */ ++ "969", /* 969 */ ++ "970", /* 970 */ ++ "971", /* 971 */ ++ "972", /* 972 */ ++ "973", /* 973 */ ++ "974", /* 974 */ ++ "975", /* 975 */ ++ "976", /* 976 */ ++ "977", /* 977 */ ++ "978", /* 978 */ ++ "979", /* 979 */ ++ "980", /* 980 */ ++ "981", /* 981 */ ++ "982", /* 982 */ ++ "983", /* 983 */ ++ "984", /* 984 */ ++ "985", /* 985 */ ++ "986", /* 986 */ ++ "987", /* 987 */ ++ "988", /* 988 */ ++ "989", /* 989 */ ++ "990", /* 990 */ ++ "991", /* 991 */ ++ "992", /* 992 */ ++ "993", /* 993 */ ++ "994", /* 994 */ ++ "995", /* 995 */ ++ "996", /* 996 */ ++ "997", /* 997 */ ++ "998", /* 998 */ ++ "999", /* 999 */ ++ "1000", /* 1000 */ ++ "1001", /* 1001 */ ++ "1002", /* 1002 */ ++ "1003", /* 1003 */ ++ "1004", /* 1004 */ ++ "1005", /* 1005 */ ++ "1006", /* 1006 */ ++ "1007", /* 1007 */ ++ "1008", /* 1008 */ ++ "1009", /* 1009 */ ++ "1010", /* 1010 */ ++ "1011", /* 1011 */ ++ "1012", /* 1012 */ ++ "1013", /* 1013 */ ++ "1014", /* 1014 */ ++ "1015", /* 1015 */ ++ "1016", /* 1016 */ ++ "1017", /* 1017 */ ++ "1018", /* 1018 */ ++ "1019", /* 1019 */ ++ "1020", /* 1020 */ ++ "1021", /* 1021 */ ++ "1022", /* 1022 */ ++ "1023", /* 1023 */ ++ "open", /* 1024 */ ++ "link", /* 1025 */ ++ "unlink", /* 1026 */ ++ "mknod", /* 1027 */ ++ "chmod", /* 1028 */ ++ "chown", /* 1029 */ ++ "mkdir", /* 1030 */ ++ "rmdir", /* 1031 */ ++ "lchown", /* 1032 */ ++ "access", /* 1033 */ ++ "rename", /* 1034 */ ++ "readlink", /* 1035 */ ++ "symlink", /* 1036 */ ++ "utimes", /* 1037 */ ++ "stat", /* 1038 */ ++ "lstat", /* 1039 */ ++ "pipe", /* 1040 */ ++ "dup2", /* 1041 */ ++ "epoll_create", /* 1042 */ ++ "inotify_init", /* 1043 */ ++ "eventfd", /* 1044 */ ++ "signalfd", /* 1045 */ ++ "sendfile", /* 1046 */ ++ "ftruncate", /* 1047 */ ++ "truncate", /* 1048 */ ++ "stat", /* 1049 */ ++ "lstat", /* 1050 */ ++ "fstat", /* 1051 */ ++ "fcntl", /* 1052 */ ++ "fadvise64", /* 1053 */ ++ "newfstatat", /* 1054 */ ++ "fstatfs", /* 1055 */ ++ "statfs", /* 1056 */ ++ "lseek", /* 1057 */ ++ "mmap", /* 1058 */ ++ "alarm", /* 1059 */ ++ "getpgrp", /* 1060 */ ++ "pause", /* 1061 */ ++ "time", /* 1062 */ ++ "utime", /* 1063 */ ++ "creat", /* 1064 */ ++ "getdents", /* 1065 */ ++ "futimesat", /* 1066 */ ++ "select", /* 1067 */ ++ "poll", /* 1068 */ ++ "epoll_wait", /* 1069 */ ++ "ustat", /* 1070 */ ++ "vfork", /* 1071 */ ++ "oldwait4", /* 1072 */ ++ "recv", /* 1073 */ ++ "send", /* 1074 */ ++ "bdflush", /* 1075 */ ++ "umount", /* 1076 */ ++ "uselib", /* 1077 */ ++ "_sysctl", /* 1078 */ ++ "fork", /* 1079 */ +diff --git a/sysdeps/linux-gnu/aarch64/trace.c b/sysdeps/linux-gnu/aarch64/trace.c +new file mode 100644 +index 0000000..5544b51 +--- /dev/null ++++ b/sysdeps/linux-gnu/aarch64/trace.c +@@ -0,0 +1,83 @@ ++/* ++ * This file is part of ltrace. ++ * Copyright (C) 2014 Petr Machata, Red Hat, Inc. ++ * ++ * This program is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU General Public License as ++ * published by the Free Software Foundation; either version 2 of the ++ * License, or (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but ++ * WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * General Public License for more details. ++ * ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++ * 02110-1301 USA ++ */ ++ ++#include ++#include ++#include ++#include ++#include ++#include ++ ++#include "backend.h" ++#include "proc.h" ++ ++void ++get_arch_dep(struct process *proc) ++{ ++} ++ ++int aarch64_read_gregs(struct process *proc, struct user_pt_regs *regs); ++ ++/* The syscall instruction is: ++ * | 31 21 | 20 5 | 4 0 | ++ * | 1 1 0 1 0 1 0 0 | 0 0 0 | imm16 | 0 0 0 0 1 | */ ++#define SVC_MASK 0xffe0001f ++#define SVC_VALUE 0xd4000001 ++ ++int ++syscall_p(struct process *proc, int status, int *sysnum) ++{ ++ if (WIFSTOPPED(status) ++ && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { ++ ++ struct user_pt_regs regs; ++ if (aarch64_read_gregs(proc, ®s) < 0) { ++ fprintf(stderr, "syscall_p: " ++ "Couldn't read registers of %d.\n", proc->pid); ++ return -1; ++ } ++ ++ errno = 0; ++ unsigned long insn = (unsigned long) ptrace(PTRACE_PEEKTEXT, ++ proc->pid, ++ regs.pc - 4, 0); ++ if (insn == -1UL && errno != 0) { ++ fprintf(stderr, "syscall_p: " ++ "Couldn't peek into %d: %s\n", proc->pid, ++ strerror(errno)); ++ return -1; ++ } ++ ++ insn &= 0xffffffffUL; ++ if ((insn & SVC_MASK) == SVC_VALUE) { ++ *sysnum = regs.regs[8]; ++ ++ size_t d1 = proc->callstack_depth - 1; ++ if (proc->callstack_depth > 0 ++ && proc->callstack[d1].is_syscall ++ && proc->callstack[d1].c_un.syscall == *sysnum) ++ return 2; ++ ++ return 1; ++ } ++ } ++ ++ return 0; ++} +diff --git a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp +index 787e342..2ccf840 100644 +--- a/testsuite/ltrace.main/system_call_params.exp ++++ b/testsuite/ltrace.main/system_call_params.exp +@@ -1,5 +1,5 @@ + # This file is part of ltrace. +-# Copyright (C) 2013 Petr Machata, Red Hat Inc. ++# Copyright (C) 2013, 2014 Petr Machata, Red Hat Inc. + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License as +@@ -17,11 +17,25 @@ + # 02110-1301 USA + + set bin [ltraceCompile {} [ltraceSource c { ++ #define _GNU_SOURCE + #include + #include + #include ++ #include ++ #include /* For SYS_xxx definitions */ ++ ++ #ifndef SYS_open ++ # if defined(__aarch64__) ++ # /* Linux doesn't actually implement SYS_open on AArch64, but for merely ++ # * recording the syscall, it's fine. */ ++ # define SYS_open 1024 ++ # else ++ # error SYS_open not available. ++ # endif ++ #endif ++ + int main(void) { +- open("/some/path", O_RDONLY); ++ syscall(SYS_open, "/some/path", O_RDONLY); + write(1, "something", 10); + mount("source", "target", "filesystemtype", 0, 0); + } +diff --git a/testsuite/ltrace.main/system_calls.c b/testsuite/ltrace.main/system_calls.c +deleted file mode 100644 +index 7be3d04..0000000 +--- a/testsuite/ltrace.main/system_calls.c ++++ /dev/null +@@ -1,68 +0,0 @@ +-/* Ltrace Test : system_calls.c. +- Objectives : Verify that Ltrace can trace all the system calls in +- execution. +- +- You can add new system calls in it and add its verification in +- system_calls correspondingly. +- +- This file was written by Yao Qi . */ +- +-#include +-#include +-#include +-#include +-#include +- +-void exit (int); +- +-#define BUF_SIZE 100 +- +-int +-main () +-{ +- FILE* fp; +- char s[]="system_calls"; +- char buffer[BUF_SIZE]; +- struct stat state; +- +- /* SYS_open. */ +- fp = fopen ("system_calls.tmp", "w"); +- if (fp == NULL) +- { +- printf("Can not create system_calls.tmp\n"); +- exit (0); +- } +- /* SYS_write. */ +- fwrite(s, sizeof(s), 1, fp); +- /* SYS_lseek. */ +- fseek (fp, 0, SEEK_CUR); +- /* SYS_read. */ +- fread(buffer, sizeof(s), 1, fp); +- /* SYS_close. */ +- fclose(fp); +- +- /* SYS_getcwd. */ +- getcwd (buffer, BUF_SIZE); +- /* SYS_chdir. */ +- chdir ("."); +- /* SYS_symlink. */ +- symlink ("system_calls.tmp", "system_calls.link"); +- /* SYS_unlink. */ +- remove("system_calls.link"); +- /* SYS_rename. */ +- rename ("system_calls.tmp", "system_calls.tmp1"); +- /* SYS_stat. */ +- stat ("system_calls.tmp", &state); +- /* SYS_access. */ +- access ("system_calls.tmp", R_OK); +- remove("system_calls.tmp1"); +- +- /* SYS_mkdir. */ +- mkdir ("system_call_mkdir", 0777); +- /* SYS_rmdir. */ +- rmdir ("system_call_mkdir"); +- +- return 0; +-} +- +- +diff --git a/testsuite/ltrace.main/system_calls.exp b/testsuite/ltrace.main/system_calls.exp +index a74fa04..f60e319 100644 +--- a/testsuite/ltrace.main/system_calls.exp ++++ b/testsuite/ltrace.main/system_calls.exp +@@ -1,67 +1,146 @@ +-# This file was written by Yao Qi . ++# This file is part of ltrace. ++# Copyright (C) 2014 Petr Machata, Red Hat Inc. ++# Copyright (C) 2006 Yao Qi , IBM Corporation ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of the ++# License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++# 02110-1301 USA + +-set testfile "system_calls" +-set srcfile ${testfile}.c +-set binfile ${testfile} ++# Objectives: Verify that Ltrace can trace all the system calls in ++# execution. Note that this test is necessarily noisy. Dynamic ++# linker adds a bunch of system calls of its own. + ++set empty [ltraceCompile {} [ltraceSource c { ++ int main (void) { return 0; } ++}]] + +-verbose "compiling source file now....." +-# Build the shared libraries this test case needs. +-if { [ ltrace_compile "${srcdir}/${subdir}/${testfile}.c" "${objdir}/${subdir}/${binfile}" executable {debug} ] != "" } { +- send_user "Testcase compile failed, so all tests in this file will automatically fail.\n" ++set bin [ltraceCompile {} [ltraceSource c { ++ #include ++ #include ++ #include ++ #include ++ #include ++ #include ++ ++ int ++ main () ++ { ++ FILE* fp; ++ char s[]="system_calls"; ++ char buffer[1024]; ++ struct stat state; ++ ++ fp = fopen ("system_calls.tmp", "w"); ++ if (fp == NULL) ++ { ++ printf("Can not create system_calls.tmp\n"); ++ exit (0); ++ } ++ fwrite(s, sizeof(s), 1, fp); ++ fseek (fp, 0, SEEK_CUR); ++ fread(buffer, sizeof(s), 1, fp); ++ fclose(fp); ++ ++ getcwd (buffer, sizeof buffer); ++ chdir ("."); ++ symlink ("system_calls.tmp", "system_calls.link"); ++ remove("system_calls.link"); ++ rename ("system_calls.tmp", "system_calls.tmp1"); ++ stat ("system_calls.tmp", &state); ++ access ("system_calls.tmp", R_OK); ++ remove("system_calls.tmp1"); ++ ++ mkdir ("system_call_mkdir", 0777); ++ rmdir ("system_call_mkdir"); ++ ++ return 0; ++ } ++}]] ++ ++proc Calls {logfile} { ++ set fp [open $logfile] ++ set ret {} ++ ++ while {[gets $fp line] >= 0} { ++ if [regexp -- {^[a-zA-Z0-9]*@SYS} $line] { ++ set call [lindex [split $line @] 0] ++ dict incr ret $call ++ } ++ } ++ ++ close $fp ++ return $ret ++} ++ ++proc GetDefault {d key def} { ++ if {[dict exists $d $key]} { ++ return [dict get $d $key] ++ } else { ++ return $def ++ } + } + +-# set options for ltrace. +-ltrace_options "-S" ++proc Diff {d1 d2} { ++ set keys [lsort -unique [concat [dict keys $d1] [dict keys $d2]]] ++ set ret {} ++ foreach key $keys { ++ set n1 [GetDefault $d1 $key 0] ++ set n2 [GetDefault $d2 $key 0] ++ set sum [expr $n1 - $n2] ++ if {[expr $sum != 0]} { ++ dict set ret $key $sum ++ } ++ } ++ return $ret ++} ++ ++proc Match {d patterns} { ++ foreach line $patterns { ++ set pattern [lindex $line 0] ++ set op [lindex $line 1] ++ set expect [lindex $line 2] + +-#Run PUT for ltarce. +-set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile] ++ set count 0 ++ foreach key [dict keys $d] { ++ if [regexp -- $pattern $key] { ++ incr count [dict get $d $key] ++ } ++ } + +-#check the output of this program. +-verbose "ltrace runtest output: $exec_output\n" ++ set msgMain "$pattern was recorded $count times" + +-if [regexp {ELF from incompatible architecture} $exec_output] { +- fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!" +- return +-} elseif [ regexp {Couldn't get .hash data} $exec_output ] { +- fail "Couldn't get .hash data!" +- return ++ if {[eval expr $count $op $expect]} { ++ pass $msgMain ++ } else { ++ fail "$msgMain, expected $op $expect" ++ } ++ } + } + ++Match [Diff [Calls [ltraceRun -L -S -- $bin]] \ ++ [Calls [ltraceRun -L -S -- $empty]]] { ++ { {^write$} == 1 } ++ { {^unlink(at)?$} >= 2 } ++ { {^open(at)?$} == 1 } ++ { {^(new|f)?stat(64)?$} == 1 } ++ { {^close$} == 1 } ++ { {^getcwd$} == 1 } ++ { {^chdir$} == 1 } ++ { {^symlink(at)?$} == 1 } ++ { {^f?access(at)?$} == 1 } ++ { {^rename(at)?$} == 1 } ++ { {^mkdir(at)?$} == 1 } ++} + +-set pattern "^munmap@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 2 +-set pattern "^write@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^unlink@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +- +-set pattern "^brk@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^open@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^(new)?fstat(64)?@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep +-set pattern "^(old_)?mmap2?@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep +-set pattern "^close@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +- +-set pattern "^getcwd@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^chdir@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^symlink@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^unlink@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^(new)?stat(64)?@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 egrep +-set pattern "^access@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^rename@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^mkdir@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 +-set pattern "^rmdir@SYS" +-ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace $pattern 1 ++ltraceDone +diff --git a/testsuite/ltrace.minor/trace-clone.c b/testsuite/ltrace.minor/trace-clone.c +index db1936d..ded930c 100644 +--- a/testsuite/ltrace.minor/trace-clone.c ++++ b/testsuite/ltrace.minor/trace-clone.c +@@ -8,6 +8,7 @@ + #include + #include + #include ++#include + + int child () + { +@@ -22,7 +23,8 @@ typedef int (* myfunc)(); + int main () + { + pid_t pid; +- static char stack[STACK_SIZE]; ++ static __attribute__ ((aligned (16))) char stack[STACK_SIZE]; ++ + #ifdef __ia64__ + pid = __clone2((myfunc)&child, stack, STACK_SIZE, CLONE_FS, NULL); + #else diff --git a/ltrace.spec b/ltrace.spec index dfae059..6ec118d 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 6%{?dist} +Release: 7%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -46,6 +46,12 @@ Patch8: ltrace-0.7.91-man.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1044766 Patch9: ltrace-0.7.91-cant_open.patch +# Support Aarch64 architecture. +Patch10: ltrace-0.7.91-aarch64.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1064406 +Patch11: ltrace-0.7.2-e_machine.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -68,6 +74,8 @@ execution of processes. %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 +%patch11 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -92,6 +100,13 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Feb 13 2014 Petr Machata - 0.7.91-7 +- Add an upstream patch that fixes missed initialization of some + fields in struct process after atteching to a multi-threaded + process. (ltrace-0.7.2-e_machine.patch) +- Add upstream patch-set that implements support for the new aarch64 + architecture. (ltrace-0.7.91-aarch64.patch) + * Tue Jan 14 2014 Petr Machata - 0.7.91-6 - Fix a problem when an invalid command has been found (ltrace-0.7.91-cant_open.patch) From f613d42c1d2134bffda40f9fa6f87279c126438e Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 02:06:33 -0500 Subject: [PATCH 014/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 6ec118d..297a202 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 7%{?dist} +Release: 8%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -100,6 +100,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 0.7.91-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Thu Feb 13 2014 Petr Machata - 0.7.91-7 - Add an upstream patch that fixes missed initialization of some fields in struct process after atteching to a multi-threaded From 43b327d5f55c4b8a6c0e54a536d8d163bfb597be Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 17 Aug 2014 07:49:14 +0000 Subject: [PATCH 015/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 297a202..7261bf5 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 8%{?dist} +Release: 9%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -100,6 +100,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Sun Aug 17 2014 Fedora Release Engineering - 0.7.91-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 0.7.91-8 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From fe527c31efcc51d1cdedd15269c2f807503099c5 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 20 Aug 2014 18:25:18 +0200 Subject: [PATCH 016/100] Add ppc64le support --- ltrace-0.7.91-ppc64le-fixes.patch | 421 +++++++++++++++ ltrace-0.7.91-ppc64le-support.patch | 786 ++++++++++++++++++++++++++++ ltrace.spec | 18 +- 3 files changed, 1224 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-ppc64le-fixes.patch create mode 100644 ltrace-0.7.91-ppc64le-support.patch diff --git a/ltrace-0.7.91-ppc64le-fixes.patch b/ltrace-0.7.91-ppc64le-fixes.patch new file mode 100644 index 0000000..82fb474 --- /dev/null +++ b/ltrace-0.7.91-ppc64le-fixes.patch @@ -0,0 +1,421 @@ +diff --git a/sysdeps/linux-gnu/ppc/arch.h b/sysdeps/linux-gnu/ppc/arch.h +index d5ad759..a8b67bb 100644 +--- a/sysdeps/linux-gnu/ppc/arch.h ++++ b/sysdeps/linux-gnu/ppc/arch.h +@@ -32,36 +32,45 @@ + #define LT_ELF_MACHINE EM_PPC + + #ifdef __powerpc64__ // Says 'ltrace' is 64 bits, says nothing about target. +-#define LT_ELFCLASS2 ELFCLASS64 +-#define LT_ELF_MACHINE2 EM_PPC64 ++# define LT_ELFCLASS2 ELFCLASS64 ++# define LT_ELF_MACHINE2 EM_PPC64 + + # ifdef __LITTLE_ENDIAN__ +-# define BREAKPOINT_VALUE { 0x08, 0x00, 0xe0, 0x7f } +-# define ARCH_ENDIAN_LITTLE ++# define BREAKPOINT_VALUE { 0x08, 0x00, 0xe0, 0x7f } ++# define ARCH_ENDIAN_LITTLE + # else +-# define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } +-# define ARCH_SUPPORTS_OPD +-# define ARCH_ENDIAN_BIG ++# define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } ++# define ARCH_SUPPORTS_OPD ++# define ARCH_ENDIAN_BIG + # endif + +-# if _CALL_ELF != 2 +-# define ARCH_SUPPORTS_OPD +-# define STACK_FRAME_OVERHEAD 112 ++# if !defined(_CALL_ELF) || _CALL_ELF < 2 ++# define ARCH_SUPPORTS_OPD ++# define STACK_FRAME_OVERHEAD 112 + # ifndef EF_PPC64_ABI +-# define EF_PPC64_ABI 3 ++# define EF_PPC64_ABI 3 + # endif +-# else /* _CALL_ELF == 2 ABIv2 */ +-# define STACK_FRAME_OVERHEAD 32 ++# elif _CALL_ELF == 2 /* ELFv2 ABI */ ++# define STACK_FRAME_OVERHEAD 32 ++# else ++# error Unsupported PowerPC64 ABI. + # endif /* CALL_ELF */ + + #else +-#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } +-#define ARCH_ENDIAN_BIG ++# define STACK_FRAME_OVERHEAD 112 ++# define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } ++# define ARCH_ENDIAN_BIG + # ifndef EF_PPC64_ABI +-# define EF_PPC64_ABI 3 ++# define EF_PPC64_ABI 3 + # endif + #endif /* __powerpc64__ */ + ++#ifdef _CALL_ELF ++enum { ppc64_call_elf_abi = _CALL_ELF }; ++#else ++enum { ppc64_call_elf_abi = 0 }; ++#endif ++ + #define ARCH_HAVE_SW_SINGLESTEP + #define ARCH_HAVE_ADD_PLT_ENTRY + #define ARCH_HAVE_ADD_FUNC_ENTRY +diff --git a/sysdeps/linux-gnu/ppc/fetch.c b/sysdeps/linux-gnu/ppc/fetch.c +index c9381c3..c6cbd71 100644 +--- a/sysdeps/linux-gnu/ppc/fetch.c ++++ b/sysdeps/linux-gnu/ppc/fetch.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2012, 2014 Petr Machata, Red Hat Inc. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "backend.h" + #include "fetch.h" +@@ -57,7 +58,7 @@ struct fetch_context { + arch_addr_t stack_pointer; + int greg; + int freg; +- int ret_struct; ++ bool ret_struct; + + union { + gregs32_t r32; +@@ -65,11 +66,29 @@ struct fetch_context { + } regs; + struct fpregs_t fpregs; + int vgreg; +- int struct_size; +- int struct_hfa_size; +- int struct_hfa_count; + }; + ++static bool ++is_eligible_hfa(struct arg_type_info *info, ++ struct arg_type_info **hfa_infop, size_t *hfa_countp) ++{ ++ size_t hfa_count; ++ struct arg_type_info *hfa_info = type_get_hfa_type(info, &hfa_count); ++ ++ if (hfa_info != NULL && hfa_count <= 8 ++ && (hfa_info->type == ARGTYPE_FLOAT ++ || hfa_info->type == ARGTYPE_DOUBLE)) { ++ ++ if (hfa_infop != NULL) ++ *hfa_infop = hfa_info; ++ if (hfa_countp != NULL) ++ *hfa_countp = hfa_count; ++ return true; ++ } ++ ++ return false; ++} ++ + static int + fetch_context_init(struct process *proc, struct fetch_context *context) + { +@@ -125,30 +144,37 @@ arch_fetch_arg_init(enum tof type, struct process *proc, + } + + context->vgreg = context->greg; +- context->struct_size = 0; +- context->struct_hfa_size = 0; +- context->struct_hfa_count = 0; + + /* Aggregates or unions of any length, and character strings + * of length longer than 8 bytes, will be returned in a + * storage buffer allocated by the caller. The caller will + * pass the address of this buffer as a hidden first argument + * in r3, causing the first explicit argument to be passed in +- * r4. */ +- context->ret_struct = ret_info->type == ARGTYPE_STRUCT; +- if (context->ret_struct) { +-#if _CALL_ELF == 2 +- /* if R3 points to stack, parameters will be in R4. */ +- uint64_t pstack_end = ptrace(PTRACE_PEEKTEXT, proc->pid, +- proc->stack_pointer, 0); +- if (((arch_addr_t)context->regs.r64[3] > proc->stack_pointer) +- && (context->regs.r64[3] < pstack_end)) { ++ * r4. ++ */ ++ ++ context->ret_struct = false; ++ ++ if (ppc64_call_elf_abi == 2) { ++ /* With ELFv2 ABI, aggregates that consist ++ * (recursively) only of members of the same ++ * floating-point or vector type, are passed in a ++ * series of floating-point resp. vector registers. ++ * Additionally, when returning any aggregate of up to ++ * 16 bytes, general-purpose registers are used. */ ++ ++ if (ret_info->type == ARGTYPE_STRUCT ++ && ! is_eligible_hfa(ret_info, NULL, NULL) ++ && type_sizeof(proc, ret_info) > 16) { ++ ++ context->ret_struct = true; + context->greg++; + context->stack_pointer += 8; + } +-#else ++ ++ } else if (ret_info->type == ARGTYPE_STRUCT) { ++ context->ret_struct = true; + context->greg++; +-#endif + } + + return context; +@@ -176,17 +202,16 @@ allocate_stack_slot(struct fetch_context *ctx, struct process *proc, + + size_t a = type_alignof(proc, info); + size_t off = 0; +- if (proc->e_machine == EM_PPC && a < 4) +- a = 4; +-#if _CALL_ELF == 2 +- else if (proc->e_machine == EM_PPC64 && sz == 4 && is_hfa_type) ++ if (proc->e_machine == EM_PPC && a < 4) { + a = 4; +- else +- a = 8; +-#else +- else if (proc->e_machine == EM_PPC64 && a < 8) +-#endif ++ } else if (ppc64_call_elf_abi == 2) { ++ if (proc->e_machine == EM_PPC64 && sz == 4 && is_hfa_type) { ++ a = 4; ++ } else ++ a = 8; ++ } else if (proc->e_machine == EM_PPC64 && a < 8) { + a = 8; ++ } + + /* XXX Remove the two double casts when arch_addr_t + * becomes integral type. */ +@@ -259,18 +284,19 @@ allocate_gpr(struct fetch_context *ctx, struct process *proc, + if (sz == (size_t)-1) + return -1; + assert(sz == 1 || sz == 2 || sz == 4 || sz == 8); +-#if _CALL_ELF == 2 +- /* Consume the stack slot corresponding to this arg. */ +- if ((sz + off) >= 8) +- ctx->greg++; + +- if (is_hfa_type) +- ctx->stack_pointer += sz; +- else +- ctx->stack_pointer += 8; +-#else +- ctx->greg++; +-#endif ++ if (ppc64_call_elf_abi == 2) { ++ /* Consume the stack slot corresponding to this arg. */ ++ if ((sz + off) >= 8) ++ ctx->greg++; ++ ++ if (is_hfa_type) ++ ctx->stack_pointer += sz; ++ else ++ ctx->stack_pointer += 8; ++ } else { ++ ctx->greg++; ++ } + + if (valuep == NULL) + return 0; +@@ -326,7 +352,6 @@ allocate_float(struct fetch_context *ctx, struct process *proc, + return allocate_stack_slot(ctx, proc, info, valuep, is_hfa_type); + } + +-#if _CALL_ELF == 2 + static int + allocate_hfa(struct fetch_context *ctx, struct process *proc, + struct arg_type_info *info, struct value *valuep, +@@ -336,27 +361,27 @@ allocate_hfa(struct fetch_context *ctx, struct process *proc, + if (sz == (size_t)-1) + return -1; + +- ctx->struct_hfa_size += sz; +- + /* There are two changes regarding structure return types: +- * * heterogeneous float/vector structs are returned +- * in (multiple) FP/vector registers, +- * instead of via implicit reference. +- * * small structs (up to 16 bytes) are return +- * in one or two GPRs, instead of via implicit reference. ++ * * heterogeneous float/vector structs are returned in ++ * (multiple) FP/vector registers, instead of via implicit ++ * reference. ++ * * small structs (up to 16 bytes) are return in one or two ++ * GPRs, instead of via implicit reference. + * + * Other structures (larger than 16 bytes, not heterogeneous) + * are still returned via implicit reference (i.e. a pointer + * to memory where to return the struct being passed in r3). +- * Of course, whether or not an implicit reference pointer +- * is present will shift the remaining arguments, +- * so you need to get this right for ELFv2 in order +- * to get the arguments correct. ++ * Of course, whether or not an implicit reference pointer is ++ * present will shift the remaining arguments, so you need to ++ * get this right for ELFv2 in order to get the arguments ++ * correct. ++ * + * If an actual parameter is known to correspond to an HFA + * formal parameter, each element is passed in the next + * available floating-point argument register starting at fp1 + * until the fp13. The remaining elements of the aggregate are +- * passed on the stack. */ ++ * passed on the stack. ++ */ + size_t slot_off = 0; + + unsigned char *buf = value_reserve(valuep, sz); +@@ -366,26 +391,17 @@ allocate_hfa(struct fetch_context *ctx, struct process *proc, + struct arg_type_info *hfa_info = type_get_simple(hfa_type); + size_t hfa_sz = type_sizeof(proc, hfa_info); + +- if (hfa_count > 8) +- ctx->struct_hfa_count += hfa_count; +- + while (hfa_count > 0 && ctx->freg <= 13) { +- int rc; + struct value tmp; +- + value_init(&tmp, proc, NULL, hfa_info, 0); ++ int rc = allocate_float(ctx, proc, hfa_info, ++ &tmp, slot_off, true); ++ if (rc == 0) ++ memcpy(buf, value_get_data(&tmp, NULL), hfa_sz); ++ value_destroy(&tmp); + +- /* Hetereogeneous struct - get value on GPR or stack. */ +- if (((hfa_type == ARGTYPE_FLOAT +- || hfa_type == ARGTYPE_DOUBLE) +- && hfa_count <= 8)) +- rc = allocate_float(ctx, proc, hfa_info, &tmp, +- slot_off, true); +- else +- rc = allocate_gpr(ctx, proc, hfa_info, &tmp, +- slot_off, true); +- +- memcpy(buf, value_get_data(&tmp, NULL), hfa_sz); ++ if (rc < 0) ++ return -1; + + slot_off += hfa_sz; + buf += hfa_sz; +@@ -394,17 +410,13 @@ allocate_hfa(struct fetch_context *ctx, struct process *proc, + slot_off = 0; + ctx->vgreg++; + } +- +- value_destroy(&tmp); +- if (rc < 0) +- return -1; + } + if (hfa_count == 0) + return 0; + + /* if no remaining FP, GPR corresponding to slot is used +- * Mostly it is in part of r10. */ +- if (ctx->struct_hfa_size <= 64 && ctx->vgreg == 10) { ++ * Mostly it is in part of r10. */ ++ if (ctx->vgreg == 10) { + while (ctx->vgreg <= 10) { + struct value tmp; + value_init(&tmp, proc, NULL, hfa_info, 0); +@@ -428,11 +440,8 @@ allocate_hfa(struct fetch_context *ctx, struct process *proc, + } + } + +- if (hfa_count == 0) +- return 0; +- + /* Remaining values are on stack */ +- while (hfa_count) { ++ while (hfa_count > 0) { + struct value tmp; + value_init(&tmp, proc, NULL, hfa_info, 0); + +@@ -444,7 +453,6 @@ allocate_hfa(struct fetch_context *ctx, struct process *proc, + } + return 0; + } +-#endif + + static int + allocate_argument(struct fetch_context *ctx, struct process *proc, +@@ -459,24 +467,20 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + case ARGTYPE_FLOAT: + case ARGTYPE_DOUBLE: + return allocate_float(ctx, proc, info, valuep, +- 8 - type_sizeof(proc,info), false); ++ 8 - type_sizeof(proc,info), false); + + case ARGTYPE_STRUCT: + if (proc->e_machine == EM_PPC) { + if (value_pass_by_reference(valuep) < 0) + return -1; +- } else { +-#if _CALL_ELF == 2 ++ } else if (ppc64_call_elf_abi == 2) { + struct arg_type_info *hfa_info; +- size_t hfa_size; +- hfa_info = type_get_hfa_type(info, &hfa_size); +- if (hfa_info != NULL ) { +- size_t sz = type_sizeof(proc, info); +- ctx->struct_size += sz; ++ size_t hfa_count; ++ if (is_eligible_hfa(info, &hfa_info, &hfa_count)) { + return allocate_hfa(ctx, proc, info, valuep, +- hfa_info->type, hfa_size); ++ hfa_info->type, hfa_count); + } +-#endif ++ } else { + /* PPC64: Fixed size aggregates and unions passed by + * value are mapped to as many doublewords of the + * parameter save area as the value uses in memory. +@@ -510,9 +514,6 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + if (sz == (size_t)-1) + return -1; + +- if (ctx->ret_struct) +- ctx->struct_size += sz; +- + size_t slots = (sz + width - 1) / width; /* Round up. */ + unsigned char *buf = value_reserve(valuep, slots * width); + if (buf == NULL) +@@ -605,19 +606,7 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, + if (fetch_context_init(proc, ctx) < 0) + return -1; + +-#if _CALL_ELF == 2 +- void *ptr = (void *)(ctx->regs.r64[1]+32); +- uint64_t val = ptrace(PTRACE_PEEKTEXT, proc->pid, ptr, 0); +- +- if (ctx->ret_struct +- && ((ctx->struct_size > 64 +- || ctx->struct_hfa_count > 8 +- || (ctx->struct_hfa_size == 0 && ctx->struct_size > 56) +- || (ctx->regs.r64[3] == ctx->regs.r64[1]+32) +- || (ctx->regs.r64[3] == val )))) { +-#else + if (ctx->ret_struct) { +-#endif + assert(info->type == ARGTYPE_STRUCT); + + uint64_t addr = read_gpr(ctx, proc, 3); diff --git a/ltrace-0.7.91-ppc64le-support.patch b/ltrace-0.7.91-ppc64le-support.patch new file mode 100644 index 0000000..e2d8daa --- /dev/null +++ b/ltrace-0.7.91-ppc64le-support.patch @@ -0,0 +1,786 @@ +From eea4ad2cce289753aaa35b4e0258a76d8f8f367c Mon Sep 17 00:00:00 2001 +From: Thierry Fauck +Date: Tue, 13 May 2014 07:48:24 -0400 +Subject: [PATCH] Support for powerpc64 arch ppc64el + +Signed-off-by: Thierry Fauck + + Add support for ppc64le proc and ELF ABIv2. + Provides support for irelative and wchar +--- + ltrace-elf.c | 2 +- + ltrace-elf.h | 1 + + sysdeps/linux-gnu/ppc/arch.h | 35 ++++- + sysdeps/linux-gnu/ppc/fetch.c | 244 +++++++++++++++++++++++++++++--- + sysdeps/linux-gnu/ppc/plt.c | 98 ++++++++++++-- + sysdeps/linux-gnu/ppc/trace.c | 10 ++ + testsuite/ltrace.main/system_calls.exp | 2 +- + 7 files changed, 356 insertions(+), 36 deletions(-) + +diff --git a/ltrace-elf.c b/ltrace-elf.c +index 8997518..f638342 100644 +--- a/ltrace-elf.c ++++ b/ltrace-elf.c +@@ -859,7 +859,7 @@ populate_plt(struct process *proc, const char *filename, + return 0; + } + +-static void ++void + delete_symbol_chain(struct library_symbol *libsym) + { + while (libsym != NULL) { +diff --git a/ltrace-elf.h b/ltrace-elf.h +index db4ffe9..4a824c4 100644 +--- a/ltrace-elf.h ++++ b/ltrace-elf.h +@@ -166,6 +166,7 @@ int elf_read_next_uleb128(Elf_Data *data, GElf_Xword *offset, uint64_t *retp); + /* Return whether there's AMOUNT more bytes after OFFSET in DATA. */ + int elf_can_read_next(Elf_Data *data, GElf_Xword offset, GElf_Xword amount); + ++void delete_symbol_chain(struct library_symbol *); + #if __WORDSIZE == 32 + #define PRI_ELF_ADDR PRIx32 + #define GELF_ADDR_CAST(x) (void *)(uint32_t)(x) +diff --git a/sysdeps/linux-gnu/ppc/arch.h b/sysdeps/linux-gnu/ppc/arch.h +index bf9b5dc..7918a13 100644 +--- a/sysdeps/linux-gnu/ppc/arch.h ++++ b/sysdeps/linux-gnu/ppc/arch.h +@@ -23,8 +23,8 @@ + #define LTRACE_PPC_ARCH_H + + #include ++#include + +-#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } + #define BREAKPOINT_LENGTH 4 + #define DECR_PC_AFTER_BREAK 0 + +@@ -34,8 +34,33 @@ + #ifdef __powerpc64__ // Says 'ltrace' is 64 bits, says nothing about target. + #define LT_ELFCLASS2 ELFCLASS64 + #define LT_ELF_MACHINE2 EM_PPC64 +-#define ARCH_SUPPORTS_OPD +-#endif ++ ++# ifdef __LITTLE_ENDIAN__ ++# define BREAKPOINT_VALUE { 0x08, 0x00, 0xe0, 0x7f } ++# define ARCH_ENDIAN_LITTLE ++# else ++# define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } ++# define ARCH_SUPPORTS_OPD ++# define ARCH_ENDIAN_BIG ++# endif ++ ++# if _CALL_ELF != 2 ++# define ARCH_SUPPORTS_OPD ++# define STACK_FRAME_OVERHEAD 112 ++# ifndef EF_PPC64_ABI ++# define EF_PPC64_ABI 3 ++# endif ++# else /* _CALL_ELF == 2 ABIv2 */ ++# define STACK_FRAME_OVERHEAD 32 ++# endif /* CALL_ELF */ ++ ++#else ++#define BREAKPOINT_VALUE { 0x7f, 0xe0, 0x00, 0x08 } ++#define ARCH_ENDIAN_BIG ++# ifndef EF_PPC64_ABI ++# define EF_PPC64_ABI 3 ++# endif ++#endif /* __powerpc64__ */ + + #define ARCH_HAVE_SW_SINGLESTEP + #define ARCH_HAVE_ADD_PLT_ENTRY +@@ -43,7 +68,6 @@ + #define ARCH_HAVE_TRANSLATE_ADDRESS + #define ARCH_HAVE_DYNLINK_DONE + #define ARCH_HAVE_FETCH_ARG +-#define ARCH_ENDIAN_BIG + #define ARCH_HAVE_SIZEOF + #define ARCH_HAVE_ALIGNOF + +@@ -56,7 +80,8 @@ struct arch_ltelf_data { + Elf_Data *opd_data; + GElf_Addr opd_base; + GElf_Xword opd_size; +- int secure_plt; ++ bool secure_plt : 1; ++ bool elfv2_abi : 1; + + Elf_Data *reladyn; + size_t reladyn_count; +diff --git a/sysdeps/linux-gnu/ppc/fetch.c b/sysdeps/linux-gnu/ppc/fetch.c +index ed38336..c9381c3 100644 +--- a/sysdeps/linux-gnu/ppc/fetch.c ++++ b/sysdeps/linux-gnu/ppc/fetch.c +@@ -30,9 +30,11 @@ + #include "ptrace.h" + #include "proc.h" + #include "value.h" ++#include "ltrace-elf.h" + + static int allocate_gpr(struct fetch_context *ctx, struct process *proc, +- struct arg_type_info *info, struct value *valuep); ++ struct arg_type_info *info, struct value *valuep, ++ size_t off, bool is_hfa_type); + + /* Floating point registers have the same width on 32-bit as well as + * 64-bit PPC, but presents a different API depending on +@@ -62,7 +64,10 @@ struct fetch_context { + gregs64_t r64; + } regs; + struct fpregs_t fpregs; +- ++ int vgreg; ++ int struct_size; ++ int struct_hfa_size; ++ int struct_hfa_count; + }; + + static int +@@ -74,7 +79,8 @@ fetch_context_init(struct process *proc, struct fetch_context *context) + if (proc->e_machine == EM_PPC) + context->stack_pointer = proc->stack_pointer + 8; + else +- context->stack_pointer = proc->stack_pointer + 112; ++ context->stack_pointer = proc->stack_pointer ++ + STACK_FRAME_OVERHEAD; + + /* When ltrace is 64-bit, we might use PTRACE_GETREGS to + * obtain 64-bit as well as 32-bit registers. But if we do it +@@ -118,6 +124,11 @@ arch_fetch_arg_init(enum tof type, struct process *proc, + return NULL; + } + ++ context->vgreg = context->greg; ++ context->struct_size = 0; ++ context->struct_hfa_size = 0; ++ context->struct_hfa_count = 0; ++ + /* Aggregates or unions of any length, and character strings + * of length longer than 8 bytes, will be returned in a + * storage buffer allocated by the caller. The caller will +@@ -125,8 +136,20 @@ arch_fetch_arg_init(enum tof type, struct process *proc, + * in r3, causing the first explicit argument to be passed in + * r4. */ + context->ret_struct = ret_info->type == ARGTYPE_STRUCT; +- if (context->ret_struct) ++ if (context->ret_struct) { ++#if _CALL_ELF == 2 ++ /* if R3 points to stack, parameters will be in R4. */ ++ uint64_t pstack_end = ptrace(PTRACE_PEEKTEXT, proc->pid, ++ proc->stack_pointer, 0); ++ if (((arch_addr_t)context->regs.r64[3] > proc->stack_pointer) ++ && (context->regs.r64[3] < pstack_end)) { ++ context->greg++; ++ context->stack_pointer += 8; ++ } ++#else + context->greg++; ++#endif ++ } + + return context; + } +@@ -144,7 +167,8 @@ arch_fetch_arg_clone(struct process *proc, + + static int + allocate_stack_slot(struct fetch_context *ctx, struct process *proc, +- struct arg_type_info *info, struct value *valuep) ++ struct arg_type_info *info, struct value *valuep, ++ bool is_hfa_type) + { + size_t sz = type_sizeof(proc, info); + if (sz == (size_t)-1) +@@ -154,7 +178,14 @@ allocate_stack_slot(struct fetch_context *ctx, struct process *proc, + size_t off = 0; + if (proc->e_machine == EM_PPC && a < 4) + a = 4; ++#if _CALL_ELF == 2 ++ else if (proc->e_machine == EM_PPC64 && sz == 4 && is_hfa_type) ++ a = 4; ++ else ++ a = 8; ++#else + else if (proc->e_machine == EM_PPC64 && a < 8) ++#endif + a = 8; + + /* XXX Remove the two double casts when arch_addr_t +@@ -164,7 +195,7 @@ allocate_stack_slot(struct fetch_context *ctx, struct process *proc, + + if (valuep != NULL) + value_in_inferior(valuep, ctx->stack_pointer + off); +- ctx->stack_pointer += sz; ++ ctx->stack_pointer += a; + + return 0; + } +@@ -216,19 +247,34 @@ align_small_int(unsigned char *buf, size_t w, size_t sz) + + static int + allocate_gpr(struct fetch_context *ctx, struct process *proc, +- struct arg_type_info *info, struct value *valuep) ++ struct arg_type_info *info, struct value *valuep, ++ size_t off, bool is_hfa_type) + { + if (ctx->greg > 10) +- return allocate_stack_slot(ctx, proc, info, valuep); ++ return allocate_stack_slot(ctx, proc, info, valuep, is_hfa_type); + +- int reg_num = ctx->greg++; +- if (valuep == NULL) +- return 0; ++ int reg_num = ctx->greg; + + size_t sz = type_sizeof(proc, info); + if (sz == (size_t)-1) + return -1; + assert(sz == 1 || sz == 2 || sz == 4 || sz == 8); ++#if _CALL_ELF == 2 ++ /* Consume the stack slot corresponding to this arg. */ ++ if ((sz + off) >= 8) ++ ctx->greg++; ++ ++ if (is_hfa_type) ++ ctx->stack_pointer += sz; ++ else ++ ctx->stack_pointer += 8; ++#else ++ ctx->greg++; ++#endif ++ ++ if (valuep == NULL) ++ return 0; ++ + if (value_reserve(valuep, sz) == NULL) + return -1; + +@@ -240,13 +286,14 @@ allocate_gpr(struct fetch_context *ctx, struct process *proc, + u.i64 = read_gpr(ctx, proc, reg_num); + if (proc->e_machine == EM_PPC) + align_small_int(u.buf, 8, sz); +- memcpy(value_get_raw_data(valuep), u.buf, sz); ++ memcpy(value_get_raw_data(valuep), u.buf + off, sz); + return 0; + } + + static int + allocate_float(struct fetch_context *ctx, struct process *proc, +- struct arg_type_info *info, struct value *valuep) ++ struct arg_type_info *info, struct value *valuep, ++ size_t off, bool is_hfa_type) + { + int pool = proc->e_machine == EM_PPC64 ? 13 : 8; + if (ctx->freg <= pool) { +@@ -257,8 +304,12 @@ allocate_float(struct fetch_context *ctx, struct process *proc, + } u = { .d = ctx->fpregs.fpregs[ctx->freg] }; + + ctx->freg++; ++ ++ if (!is_hfa_type) ++ ctx->vgreg++; ++ + if (proc->e_machine == EM_PPC64) +- allocate_gpr(ctx, proc, info, NULL); ++ allocate_gpr(ctx, proc, info, NULL, off, is_hfa_type); + + size_t sz = sizeof(double); + if (info->type == ARGTYPE_FLOAT) { +@@ -272,8 +323,128 @@ allocate_float(struct fetch_context *ctx, struct process *proc, + memcpy(value_get_raw_data(valuep), u.buf, sz); + return 0; + } +- return allocate_stack_slot(ctx, proc, info, valuep); ++ return allocate_stack_slot(ctx, proc, info, valuep, is_hfa_type); ++} ++ ++#if _CALL_ELF == 2 ++static int ++allocate_hfa(struct fetch_context *ctx, struct process *proc, ++ struct arg_type_info *info, struct value *valuep, ++ enum arg_type hfa_type, size_t hfa_count) ++{ ++ size_t sz = type_sizeof(proc, info); ++ if (sz == (size_t)-1) ++ return -1; ++ ++ ctx->struct_hfa_size += sz; ++ ++ /* There are two changes regarding structure return types: ++ * * heterogeneous float/vector structs are returned ++ * in (multiple) FP/vector registers, ++ * instead of via implicit reference. ++ * * small structs (up to 16 bytes) are return ++ * in one or two GPRs, instead of via implicit reference. ++ * ++ * Other structures (larger than 16 bytes, not heterogeneous) ++ * are still returned via implicit reference (i.e. a pointer ++ * to memory where to return the struct being passed in r3). ++ * Of course, whether or not an implicit reference pointer ++ * is present will shift the remaining arguments, ++ * so you need to get this right for ELFv2 in order ++ * to get the arguments correct. ++ * If an actual parameter is known to correspond to an HFA ++ * formal parameter, each element is passed in the next ++ * available floating-point argument register starting at fp1 ++ * until the fp13. The remaining elements of the aggregate are ++ * passed on the stack. */ ++ size_t slot_off = 0; ++ ++ unsigned char *buf = value_reserve(valuep, sz); ++ if (buf == NULL) ++ return -1; ++ ++ struct arg_type_info *hfa_info = type_get_simple(hfa_type); ++ size_t hfa_sz = type_sizeof(proc, hfa_info); ++ ++ if (hfa_count > 8) ++ ctx->struct_hfa_count += hfa_count; ++ ++ while (hfa_count > 0 && ctx->freg <= 13) { ++ int rc; ++ struct value tmp; ++ ++ value_init(&tmp, proc, NULL, hfa_info, 0); ++ ++ /* Hetereogeneous struct - get value on GPR or stack. */ ++ if (((hfa_type == ARGTYPE_FLOAT ++ || hfa_type == ARGTYPE_DOUBLE) ++ && hfa_count <= 8)) ++ rc = allocate_float(ctx, proc, hfa_info, &tmp, ++ slot_off, true); ++ else ++ rc = allocate_gpr(ctx, proc, hfa_info, &tmp, ++ slot_off, true); ++ ++ memcpy(buf, value_get_data(&tmp, NULL), hfa_sz); ++ ++ slot_off += hfa_sz; ++ buf += hfa_sz; ++ hfa_count--; ++ if (slot_off == 8) { ++ slot_off = 0; ++ ctx->vgreg++; ++ } ++ ++ value_destroy(&tmp); ++ if (rc < 0) ++ return -1; ++ } ++ if (hfa_count == 0) ++ return 0; ++ ++ /* if no remaining FP, GPR corresponding to slot is used ++ * Mostly it is in part of r10. */ ++ if (ctx->struct_hfa_size <= 64 && ctx->vgreg == 10) { ++ while (ctx->vgreg <= 10) { ++ struct value tmp; ++ value_init(&tmp, proc, NULL, hfa_info, 0); ++ union { ++ uint64_t i64; ++ unsigned char buf[0]; ++ } u; ++ ++ u.i64 = read_gpr(ctx, proc, ctx->vgreg); ++ ++ memcpy(buf, u.buf + slot_off, hfa_sz); ++ slot_off += hfa_sz; ++ buf += hfa_sz; ++ hfa_count--; ++ ctx->stack_pointer += hfa_sz; ++ if (slot_off >= 8 ) { ++ slot_off = 0; ++ ctx->vgreg++; ++ } ++ value_destroy(&tmp); ++ } ++ } ++ ++ if (hfa_count == 0) ++ return 0; ++ ++ /* Remaining values are on stack */ ++ while (hfa_count) { ++ struct value tmp; ++ value_init(&tmp, proc, NULL, hfa_info, 0); ++ ++ value_in_inferior(&tmp, ctx->stack_pointer); ++ memcpy(buf, value_get_data(&tmp, NULL), hfa_sz); ++ ctx->stack_pointer += hfa_sz; ++ buf += hfa_sz; ++ hfa_count--; ++ } ++ return 0; + } ++#endif + + static int + allocate_argument(struct fetch_context *ctx, struct process *proc, +@@ -287,13 +458,25 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + + case ARGTYPE_FLOAT: + case ARGTYPE_DOUBLE: +- return allocate_float(ctx, proc, info, valuep); ++ return allocate_float(ctx, proc, info, valuep, ++ 8 - type_sizeof(proc,info), false); + + case ARGTYPE_STRUCT: + if (proc->e_machine == EM_PPC) { + if (value_pass_by_reference(valuep) < 0) + return -1; + } else { ++#if _CALL_ELF == 2 ++ struct arg_type_info *hfa_info; ++ size_t hfa_size; ++ hfa_info = type_get_hfa_type(info, &hfa_size); ++ if (hfa_info != NULL ) { ++ size_t sz = type_sizeof(proc, info); ++ ctx->struct_size += sz; ++ return allocate_hfa(ctx, proc, info, valuep, ++ hfa_info->type, hfa_size); ++ } ++#endif + /* PPC64: Fixed size aggregates and unions passed by + * value are mapped to as many doublewords of the + * parameter save area as the value uses in memory. +@@ -326,6 +509,10 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + size_t sz = type_sizeof(proc, valuep->type); + if (sz == (size_t)-1) + return -1; ++ ++ if (ctx->ret_struct) ++ ctx->struct_size += sz; ++ + size_t slots = (sz + width - 1) / width; /* Round up. */ + unsigned char *buf = value_reserve(valuep, slots * width); + if (buf == NULL) +@@ -346,9 +533,11 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + struct arg_type_info *fp_info + = type_get_fp_equivalent(valuep->type); + if (fp_info != NULL) +- rc = allocate_float(ctx, proc, fp_info, &val); ++ rc = allocate_float(ctx, proc, fp_info, &val, ++ 8-type_sizeof(proc,info), false); + else +- rc = allocate_gpr(ctx, proc, long_info, &val); ++ rc = allocate_gpr(ctx, proc, long_info, &val, ++ 0, false); + + if (rc >= 0) { + memcpy(ptr, value_get_data(&val, NULL), width); +@@ -363,6 +552,7 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + return rc; + } + ++#ifndef __LITTLE_ENDIAN__ + /* Small values need post-processing. */ + if (sz < width) { + switch (info->type) { +@@ -394,6 +584,7 @@ allocate_argument(struct fetch_context *ctx, struct process *proc, + break; + } + } ++#endif + + return 0; + } +@@ -411,7 +602,22 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, + struct process *proc, struct arg_type_info *info, + struct value *valuep) + { ++ if (fetch_context_init(proc, ctx) < 0) ++ return -1; ++ ++#if _CALL_ELF == 2 ++ void *ptr = (void *)(ctx->regs.r64[1]+32); ++ uint64_t val = ptrace(PTRACE_PEEKTEXT, proc->pid, ptr, 0); ++ ++ if (ctx->ret_struct ++ && ((ctx->struct_size > 64 ++ || ctx->struct_hfa_count > 8 ++ || (ctx->struct_hfa_size == 0 && ctx->struct_size > 56) ++ || (ctx->regs.r64[3] == ctx->regs.r64[1]+32) ++ || (ctx->regs.r64[3] == val )))) { ++#else + if (ctx->ret_struct) { ++#endif + assert(info->type == ARGTYPE_STRUCT); + + uint64_t addr = read_gpr(ctx, proc, 3); +@@ -424,8 +630,6 @@ arch_fetch_retval(struct fetch_context *ctx, enum tof type, + return 0; + } + +- if (fetch_context_init(proc, ctx) < 0) +- return -1; + return allocate_argument(ctx, proc, info, valuep); + } + +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 332daa8..45ed7fb 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -136,7 +136,11 @@ + */ + + #define PPC_PLT_STUB_SIZE 16 +-#define PPC64_PLT_STUB_SIZE 8 //xxx ++#if _CALL_ELF != 2 ++#define PPC64_PLT_STUB_SIZE 8 ++#else ++#define PPC64_PLT_STUB_SIZE 4 ++#endif + + static inline int + host_powerpc64() +@@ -186,8 +190,13 @@ ppc32_delayed_symbol(struct library_symbol *libsym) + if ((insn1 & BRANCH_MASK) == B_INSN + || ((insn2 & BRANCH_MASK) == B_INSN + /* XXX double cast */ ++#ifdef __LITTLE_ENDIAN__ ++ && (ppc_branch_dest(libsym->enter_addr + 4, insn1) ++ == (arch_addr_t) (long) libsym->lib->arch.pltgot_addr))) ++#else + && (ppc_branch_dest(libsym->enter_addr + 4, insn2) + == (arch_addr_t) (long) libsym->lib->arch.pltgot_addr))) ++#endif + { + mark_as_resolved(libsym, libsym->arch.resolved_value); + } +@@ -206,7 +215,7 @@ arch_dynlink_done(struct process *proc) + "couldn't read PLT value for %s(%p): %s\n", + libsym->name, libsym->enter_addr, + strerror(errno)); +- return; ++ return; + } + + if (proc->e_machine == EM_PPC) +@@ -227,8 +236,14 @@ reloc_is_irelative(int machine, GElf_Rela *rela) + { + bool irelative = false; + if (machine == EM_PPC64) { +-#ifdef R_PPC64_JMP_IREL ++#ifdef __LITTLE_ENDIAN__ ++# ifdef R_PPC64_IRELATIVE ++ irelative = GELF_R_TYPE(rela->r_info) == R_PPC64_IRELATIVE; ++# endif ++#else ++# ifdef R_PPC64_JMP_IREL + irelative = GELF_R_TYPE(rela->r_info) == R_PPC64_JMP_IREL; ++# endif + #endif + } else { + assert(machine == EM_PPC); +@@ -285,6 +300,7 @@ arch_translate_address_dyn(struct process *proc, + arch_addr_t addr, arch_addr_t *ret) + { + if (proc->e_machine == EM_PPC64) { ++#if _CALL_ELF != 2 + uint64_t value; + if (proc_read_64(proc, addr, &value) < 0) { + fprintf(stderr, +@@ -296,6 +312,7 @@ arch_translate_address_dyn(struct process *proc, + * arch_addr_t becomes integral type. */ + *ret = (arch_addr_t)(uintptr_t)value; + return 0; ++#endif + } + + *ret = addr; +@@ -306,7 +323,8 @@ int + arch_translate_address(struct ltelf *lte, + arch_addr_t addr, arch_addr_t *ret) + { +- if (lte->ehdr.e_machine == EM_PPC64) { ++ if (lte->ehdr.e_machine == EM_PPC64 ++ && !lte->arch.elfv2_abi) { + /* XXX The double cast should be removed when + * arch_addr_t becomes integral type. */ + GElf_Xword offset +@@ -430,7 +448,16 @@ reloc_copy_if_irelative(GElf_Rela *rela, void *data) + int + arch_elf_init(struct ltelf *lte, struct library *lib) + { ++ ++ /* Check for ABIv2 in ELF header processor specific flag. */ ++#ifndef EF_PPC64_ABI ++ assert (! (lte->ehdr.e_flags & 3 ) == 2) ++#else ++ lte->arch.elfv2_abi=((lte->ehdr.e_flags & EF_PPC64_ABI) == 2) ; ++#endif ++ + if (lte->ehdr.e_machine == EM_PPC64 ++ && !lte->arch.elfv2_abi + && load_opd_data(lte, lib) < 0) + return -1; + +@@ -599,7 +626,7 @@ read_plt_slot_value(struct process *proc, GElf_Addr addr, GElf_Addr *valp) + uint64_t l; + /* XXX double cast. */ + if (proc_read_64(proc, (arch_addr_t)(uintptr_t)addr, &l) < 0) { +- fprintf(stderr, "ptrace .plt slot value @%#" PRIx64": %s\n", ++ debug(DEBUG_EVENT, "ptrace .plt slot value @%#" PRIx64": %s", + addr, strerror(errno)); + return -1; + } +@@ -616,7 +643,7 @@ unresolve_plt_slot(struct process *proc, GElf_Addr addr, GElf_Addr value) + * pointers intact. Hence the only adjustment that we need to + * do is to IP. */ + if (ptrace(PTRACE_POKETEXT, proc->pid, addr, value) < 0) { +- fprintf(stderr, "failed to unresolve .plt slot: %s\n", ++ debug(DEBUG_EVENT, "failed to unresolve .plt slot: %s", + strerror(errno)); + return -1; + } +@@ -629,9 +656,48 @@ arch_elf_add_func_entry(struct process *proc, struct ltelf *lte, + arch_addr_t addr, const char *name, + struct library_symbol **ret) + { +- if (lte->ehdr.e_machine != EM_PPC || lte->ehdr.e_type == ET_DYN) ++#ifndef PPC64_LOCAL_ENTRY_OFFSET ++ assert(! lte->arch.elfv2_abi); ++#else ++ /* With ABIv2 st_other field contains an offset. */ ++ if (lte->arch.elfv2_abi) ++ addr += PPC64_LOCAL_ENTRY_OFFSET(sym->st_other); ++#endif ++ ++ int st_info = GELF_ST_TYPE(sym->st_info); ++ ++ if ((lte->ehdr.e_machine != EM_PPC && sym->st_other == 0) ++ || lte->ehdr.e_type == ET_DYN ++ || (st_info == STT_FUNC && ! sym->st_other)) + return PLT_DEFAULT; + ++ if (st_info == STT_FUNC) { ++ /* Put the default symbol to the chain. ++ * The addr has already been updated with ++ * symbol offset */ ++ char *full_name = strdup(name); ++ if (full_name == NULL) { ++ fprintf(stderr, "couldn't copy name of %s: %s\n", ++ name, strerror(errno)); ++ free(full_name); ++ return PLT_FAIL; ++ } ++ struct library_symbol *libsym = malloc(sizeof *libsym); ++ 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" ++ "for tracing.\n", name); ++ } ++ full_name = NULL; ++ libsym->next = *ret; ++ *ret = libsym; ++ return PLT_OK; ++ } ++ + bool ifunc = false; + #ifdef STT_GNU_IFUNC + ifunc = GELF_ST_TYPE(sym->st_info) == STT_GNU_IFUNC; +@@ -761,9 +827,15 @@ arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, + assert(plt_slot_addr >= lte->plt_addr + || plt_slot_addr < lte->plt_addr + lte->plt_size); + ++ /* Should avoid to do read if dynamic linker hasn't run yet ++ * or allow -1 a valid return code. */ + GElf_Addr plt_slot_value; +- if (read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value) < 0) +- goto fail; ++ if (read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value) < 0) { ++ if (!lte->arch.elfv2_abi) ++ goto fail; ++ else ++ return PPC_PLT_UNRESOLVED; ++ } + + struct library_symbol *libsym = malloc(sizeof(*libsym)); + if (libsym == NULL) { +@@ -997,8 +1069,12 @@ ppc_plt_bp_continue(struct breakpoint *bp, struct process *proc) + return; + } + ++#if _CALL_ELF == 2 ++ continue_after_breakpoint(proc, bp); ++#else + jump_to_entry_point(proc, bp); + continue_process(proc->pid); ++#endif + return; + + case PPC64_PLT_STUB: +@@ -1123,7 +1199,11 @@ arch_library_symbol_init(struct library_symbol *libsym) + /* We set type explicitly in the code above, where we have the + * necessary context. This is for calls from ltrace-elf.c and + * such. */ ++#if _CALL_ELF == 2 ++ libsym->arch.type = PPC_PLT_UNRESOLVED; ++#else + libsym->arch.type = PPC_DEFAULT; ++#endif + return 0; + } + +diff --git a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c +index ee9a6b5..5aab538 100644 +--- a/sysdeps/linux-gnu/ppc/trace.c ++++ b/sysdeps/linux-gnu/ppc/trace.c +@@ -65,9 +65,15 @@ syscall_p(struct process *proc, int status, int *sysnum) + if (WIFSTOPPED(status) + && WSTOPSIG(status) == (SIGTRAP | proc->tracesysgood)) { + long pc = (long)get_instruction_pointer(proc); ++#ifndef __LITTLE_ENDIAN__ + int insn = + (int)ptrace(PTRACE_PEEKTEXT, proc->pid, pc - sizeof(long), + 0); ++#else ++ int insn = ++ (int)ptrace(PTRACE_PEEKTEXT, proc->pid, pc - sizeof(int), ++ 0); ++#endif + + if (insn == SYSCALL_INSN) { + *sysnum = +diff -up ltrace-0.7.91/sysdeps/linux-gnu/ppc/trace.c\~ ltrace-0.7.91/sysdeps/linux-gnu/ppc/trace.c +--- ltrace-0.7.91/sysdeps/linux-gnu/ppc/trace.c~ 2014-08-08 14:05:58.000000000 +0200 ++++ ltrace-0.7.91/sysdeps/linux-gnu/ppc/trace.c 2014-08-08 14:07:55.000000000 +0200 +@@ -133,7 +133,11 @@ arch_sw_singlestep(struct process *proc, + return SWS_FAIL; + uint32_t insn; + #ifdef __powerpc64__ ++# ifdef __LITTLE_ENDIAN__ ++ insn = (uint32_t) l; ++# else + insn = l >> 32; ++# endif + #else + insn = l; + #endif +diff -up ltrace-0.7.91/configure\~ ltrace-0.7.91/configure +--- ltrace-0.7.91/configure~ 2014-08-08 14:09:12.000000000 +0200 ++++ ltrace-0.7.91/configure 2014-08-08 14:18:30.000000000 +0200 +@@ -2555,7 +2555,7 @@ case "${host_cpu}" in + arm*|sa110) HOST_CPU="arm" ;; + cris*) HOST_CPU="cris" ;; + mips*) HOST_CPU="mips" ;; +- powerpc|powerpc64) HOST_CPU="ppc" ;; ++ powerpc|powerpc64|powerpc64le) HOST_CPU="ppc" ;; + sun4u|sparc64) HOST_CPU="sparc" ;; + s390x) HOST_CPU="s390" ;; + i?86|x86_64) HOST_CPU="x86" ;; +@@ -12094,7 +12094,7 @@ if test x"$enable_libunwind" = xyes; the + arm*|sa110) UNWIND_ARCH="arm" ;; + i?86) UNWIND_ARCH="x86" ;; + powerpc) UNWIND_ARCH="ppc32" ;; +- powerpc64) UNWIND_ARCH="ppc64" ;; ++ powerpc64|powerpc64le) UNWIND_ARCH="ppc64" ;; + mips*) UNWIND_ARCH="mips" ;; + *) UNWIND_ARCH="${host_cpu}" ;; + esac diff --git a/ltrace.spec b/ltrace.spec index 7261bf5..303d643 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 9%{?dist} +Release: 10%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -52,6 +52,15 @@ Patch10: ltrace-0.7.91-aarch64.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1064406 Patch11: ltrace-0.7.2-e_machine.patch +# Support for ppc64le, backported from upstream. +# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=eea4ad2cce289753aaa35b4e0258a76d8f8f367c +# https://bugzilla.redhat.com/show_bug.cgi?id=1125601 +Patch13: ltrace-0.7.91-ppc64le-support.patch +# 35a9677dc9dcb7909ebd28f30200474d7e8b660f, +# 437d2377119036346f4dbd93039c847b4cc9d0be, +# eb3993420734f091cde9a6053ca6b4edcf9ae334 +Patch14: ltrace-0.7.91-ppc64le-fixes.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -76,6 +85,8 @@ execution of processes. %patch9 -p1 %patch10 -p1 %patch11 -p1 +%patch13 -p1 +%patch14 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -100,6 +111,11 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Aug 20 2014 Petr Machata - 0.7.91-10 +- Backported PowerPC64 ELFv2 support. + (ltrace-0.7.91-ppc64le-support.patch, + ltrace-0.7.91-ppc64le-fixes.patch) + * Sun Aug 17 2014 Fedora Release Engineering - 0.7.91-9 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From e5a35a0ade899fe80c7d482fee19c662a2bcf48e Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Thu, 21 Aug 2014 13:35:01 +0200 Subject: [PATCH 017/100] Fix a bug reference --- ltrace.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 303d643..fbb7c24 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -54,7 +54,7 @@ Patch11: ltrace-0.7.2-e_machine.patch # Support for ppc64le, backported from upstream. # http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=eea4ad2cce289753aaa35b4e0258a76d8f8f367c -# https://bugzilla.redhat.com/show_bug.cgi?id=1125601 +# https://bugzilla.redhat.com/show_bug.cgi?id=1131956 Patch13: ltrace-0.7.91-ppc64le-support.patch # 35a9677dc9dcb7909ebd28f30200474d7e8b660f, # 437d2377119036346f4dbd93039c847b4cc9d0be, From 5f8efb0257eaa772639d5a4912a6b5e3a709ceab Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 9 Dec 2014 19:04:59 +0100 Subject: [PATCH 018/100] Fix bias handling and cloning of unresolved breakpoints on ppc --- ltrace-0.7.91-ppc-bias.patch | 91 ++++++++++++++++++++++++++++++++++++ ltrace.spec | 21 ++++++++- 2 files changed, 110 insertions(+), 2 deletions(-) create mode 100644 ltrace-0.7.91-ppc-bias.patch diff --git a/ltrace-0.7.91-ppc-bias.patch b/ltrace-0.7.91-ppc-bias.patch new file mode 100644 index 0000000..c0c0abd --- /dev/null +++ b/ltrace-0.7.91-ppc-bias.patch @@ -0,0 +1,91 @@ +diff --git a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +index 45ed7fb..5f81889 100644 +--- a/sysdeps/linux-gnu/ppc/plt.c ++++ b/sysdeps/linux-gnu/ppc/plt.c +@@ -274,14 +274,15 @@ arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela) + + assert(rela->r_addend != 0); + /* XXX double cast */ +- arch_addr_t res_addr = (arch_addr_t) (uintptr_t) rela->r_addend; ++ arch_addr_t res_addr ++ = (arch_addr_t) (uintptr_t) (rela->r_addend + lte->bias); + if (arch_translate_address(lte, res_addr, &res_addr) < 0) { + fprintf(stderr, "Couldn't OPD-translate IRELATIVE " + "resolver address.\n"); + return 0; + } + /* XXX double cast */ +- return (GElf_Addr) (uintptr_t) res_addr; ++ return (GElf_Addr) (uintptr_t) (res_addr - lte->bias); + + } else { + /* We put brakpoints to PLT entries the same as the +@@ -453,7 +454,7 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + #ifndef EF_PPC64_ABI + assert (! (lte->ehdr.e_flags & 3 ) == 2) + #else +- lte->arch.elfv2_abi=((lte->ehdr.e_flags & EF_PPC64_ABI) == 2) ; ++ lte->arch.elfv2_abi = ((lte->ehdr.e_flags & EF_PPC64_ABI) == 2); + #endif + + if (lte->ehdr.e_machine == EM_PPC64 +@@ -827,15 +828,15 @@ arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, + assert(plt_slot_addr >= lte->plt_addr + || plt_slot_addr < lte->plt_addr + lte->plt_size); + ++ plt_entry_addr += lte->bias; ++ plt_slot_addr += lte->bias; ++ + /* Should avoid to do read if dynamic linker hasn't run yet + * or allow -1 a valid return code. */ + GElf_Addr plt_slot_value; +- if (read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value) < 0) { +- if (!lte->arch.elfv2_abi) +- goto fail; +- else +- return PPC_PLT_UNRESOLVED; +- } ++ int rc = read_plt_slot_value(proc, plt_slot_addr, &plt_slot_value); ++ if (rc < 0 && !lte->arch.elfv2_abi) ++ goto fail; + + struct library_symbol *libsym = malloc(sizeof(*libsym)); + if (libsym == NULL) { +@@ -854,8 +855,9 @@ arch_elf_add_plt_entry(struct process *proc, struct ltelf *lte, + goto fail2; + libsym->arch.plt_slot_addr = plt_slot_addr; + +- if (! is_irelative +- && (plt_slot_value == plt_entry_addr || plt_slot_value == 0)) { ++ if (rc < 0 || (! is_irelative ++ && (plt_slot_value == plt_entry_addr ++ || plt_slot_value == 0))) { + libsym->arch.type = PPC_PLT_UNRESOLVED; + libsym->arch.resolved_value = plt_entry_addr; + } else { +@@ -1166,8 +1168,8 @@ ppc_plt_bp_install(struct breakpoint *bp, struct process *proc) + libsym->arch.resolved_value = plt_entry_addr; + } + } else { +- fprintf(stderr, "Couldn't unresolve %s@%p. Not tracing" +- " this symbol.\n", ++ fprintf(stderr, "Couldn't unresolve %s@%p. Will not" ++ " trace this symbol.\n", + breakpoint_name(bp), bp->addr); + proc_remove_breakpoint(proc, bp); + } +@@ -1222,6 +1224,14 @@ arch_library_symbol_clone(struct library_symbol *retp, + struct library_symbol *libsym) + { + retp->arch = libsym->arch; ++ if (libsym->arch.type == PPC_PLT_NEED_UNRESOLVE) { ++ assert(libsym->arch.data->self == libsym->arch.data); ++ retp->arch.data = malloc(sizeof *retp->arch.data); ++ if (retp->arch.data == NULL) ++ return -1; ++ *retp->arch.data = *libsym->arch.data; ++ retp->arch.data->self = retp->arch.data; ++ } + return 0; + } + diff --git a/ltrace.spec b/ltrace.spec index fbb7c24..5a050d3 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,12 +1,12 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 10%{?dist} +Release: 11%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers -BuildRequires: elfutils-libelf-devel dejagnu +BuildRequires: elfutils-devel dejagnu BuildRequires: libselinux-devel # Note: this URL needs to be updated for each release, as the file @@ -61,6 +61,16 @@ Patch13: ltrace-0.7.91-ppc64le-support.patch # eb3993420734f091cde9a6053ca6b4edcf9ae334 Patch14: ltrace-0.7.91-ppc64le-fixes.patch +# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=2e9f9f1f5d0fb223b109429b9c904504b7f638e2 +# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=f96635a03b3868057db5c2d7972d5533e2068345 +Patch15: ltrace-0.7.91-parser-ws_after_id.patch + +# https://bugzilla.redhat.com/show_bug.cgi?id=1171165 +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=d8f1287b85e2c2b2ae0235809e956f4365e53c45 +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=d80c5371454383e3f9978622e5578cf02af8c44c +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=bf82100966deda9c7d26ad085d97c08126a8ae88 +Patch16: ltrace-0.7.91-ppc-bias.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -87,6 +97,8 @@ execution of processes. %patch11 -p1 %patch13 -p1 %patch14 -p1 +%patch15 -p1 +%patch16 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -111,6 +123,11 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Dec 9 2014 Petr Machata - 0.7.91-11 +- Fix bias handling in PPC backend +- Fix cloning of unresolved breakpoints in PPC backend + (ltrace-0.7.91-ppc-bias.patch) + * Wed Aug 20 2014 Petr Machata - 0.7.91-10 - Backported PowerPC64 ELFv2 support. (ltrace-0.7.91-ppc64le-support.patch, From 155cbc3dc74f9395b8646c8ac4da77e613dbd262 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Tue, 9 Dec 2014 19:20:38 +0100 Subject: [PATCH 019/100] Add a forgotten patch --- ltrace-0.7.91-parser-ws_after_id.patch | 144 +++++++++++++++++++++++++ 1 file changed, 144 insertions(+) create mode 100644 ltrace-0.7.91-parser-ws_after_id.patch diff --git a/ltrace-0.7.91-parser-ws_after_id.patch b/ltrace-0.7.91-parser-ws_after_id.patch new file mode 100644 index 0000000..bc6e96e --- /dev/null +++ b/ltrace-0.7.91-parser-ws_after_id.patch @@ -0,0 +1,144 @@ +From 2e9f9f1f5d0fb223b109429b9c904504b7f638e2 Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Fri, 8 Aug 2014 16:53:41 +0200 +Subject: [PATCH] In config files, allow whitespace between identifier and + opening paren + +--- + read_config_file.c | 61 ++++++-------------------------- + testsuite/ltrace.main/parameters2.exp | 14 +++++++- + 2 files changed, 25 insertions(+), 50 deletions(-) + +diff --git a/read_config_file.c b/read_config_file.c +index ea3ab88..05ff283 100644 +--- a/read_config_file.c ++++ b/read_config_file.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2011,2012,2013 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2011,2012,2013,2014 Petr Machata, Red Hat Inc. + * Copyright (C) 1998,1999,2003,2007,2008,2009 Juan Cespedes + * Copyright (C) 2006 Ian Wienand + * Copyright (C) 2006 Steve Fink +@@ -168,38 +168,6 @@ parse_ident(struct locus *loc, char **str) + return xstrndup(ident, *str - ident); + } + +-/* +- Returns position in string at the left parenthesis which starts the +- function's argument signature. Returns NULL on error. +-*/ +-static char * +-start_of_arg_sig(char *str) { +- char *pos; +- int stacked = 0; +- +- if (!strlen(str)) +- return NULL; +- +- pos = &str[strlen(str)]; +- do { +- pos--; +- if (pos < str) +- return NULL; +- while ((pos > str) && (*pos != ')') && (*pos != '(')) +- pos--; +- +- if (*pos == ')') +- stacked++; +- else if (*pos == '(') +- stacked--; +- else +- return NULL; +- +- } while (stacked > 0); +- +- return (stacked == 0) ? pos : NULL; +-} +- + static int + parse_int(struct locus *loc, char **str, long *ret) + { +@@ -1110,7 +1078,6 @@ static int + process_line(struct protolib *plib, struct locus *loc, char *buf) + { + char *str = buf; +- char *tmp; + + debug(3, "Reading line %d of `%s'", loc->line_no, loc->filename); + eat_spaces(&str); +@@ -1148,22 +1115,13 @@ process_line(struct protolib *plib, struct locus *loc, char *buf) + debug(4, " return_type = %d", fun.return_info->type); + + eat_spaces(&str); +- tmp = start_of_arg_sig(str); +- if (tmp == NULL) { +- report_error(loc->filename, loc->line_no, "syntax error"); ++ proto_name = parse_ident(loc, &str); ++ if (proto_name == NULL) + goto err; +- } +- *tmp = '\0'; + +- proto_name = strdup(str); +- if (proto_name == NULL) { +- oom: +- report_error(loc->filename, loc->line_no, +- "%s", strerror(errno)); ++ eat_spaces(&str); ++ if (parse_char(loc, &str, '(') < 0) + goto err; +- } +- +- str = tmp + 1; + debug(3, " name = %s", proto_name); + + struct param *extra_param = NULL; +@@ -1177,8 +1135,13 @@ process_line(struct protolib *plib, struct locus *loc, char *buf) + if (have_stop == 0) { + struct param param; + param_init_stop(¶m); +- if (prototype_push_param(&fun, ¶m) < 0) +- goto oom; ++ if (prototype_push_param(&fun, ¶m) < 0) { ++ oom: ++ report_error(loc->filename, ++ loc->line_no, ++ "%s", strerror(errno)); ++ goto err; ++ } + have_stop = 1; + } + str++; +diff --git a/testsuite/ltrace.main/parameters2.exp b/testsuite/ltrace.main/parameters2.exp +index 6318fc5..9850079 100644 +--- a/testsuite/ltrace.main/parameters2.exp ++++ b/testsuite/ltrace.main/parameters2.exp +@@ -1,5 +1,5 @@ + # This file is part of ltrace. +-# Copyright (C) 2012, 2013 Petr Machata, Red Hat Inc. ++# Copyright (C) 2012, 2013, 2014 Petr Machata, Red Hat Inc. + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License as +@@ -259,4 +259,16 @@ ltraceMatch1 [ltraceLibTest { + somefunc(); + }] {somefunc\(\) *= nil} == 1 + ++# Test that spaces in function name make no difference. ++ ++ltraceMatch1 [ltraceLibTest { ++ void somefunc (); ++} { ++ void somefunc(void); ++} { ++ void somefunc(void) {} ++} { ++ somefunc(); ++}] {somefunc\(\)} == 1 ++ + ltraceDone +-- +1.7.6.5 + From a23b75f310e75c65e50e92746f43ece361ba1e7e Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 7 Jan 2015 15:46:24 +0100 Subject: [PATCH 020/100] Add upstream fix for a bug in labeling PLT slots --- ltrace-0.7.91-x86-plt_map.patch | 101 +++++++++++++++++++++++++++ ltrace-0.7.91-x86-unused_label.patch | 32 +++++++++ ltrace.spec | 12 +++- 3 files changed, 144 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-x86-plt_map.patch create mode 100644 ltrace-0.7.91-x86-unused_label.patch diff --git a/ltrace-0.7.91-x86-plt_map.patch b/ltrace-0.7.91-x86-plt_map.patch new file mode 100644 index 0000000..9983cc7 --- /dev/null +++ b/ltrace-0.7.91-x86-plt_map.patch @@ -0,0 +1,101 @@ +From fba95ad936f1d8c1052259bae811f1fc07f9a215 Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Thu, 30 Oct 2014 01:48:17 +0100 +Subject: [PATCH] Initialize the PLT slot map correctly on x86 and x86_64 + +The PLT slot map translates relocation numbers to PLT slot numbers, +but was actually initialized in the opposite direction. Fix the way +it's initialized. This bug can be seen on glibc in particular: + + $ ltrace -e free ls + libc.so.6->free(0x5) = + libc.so.6->free(0x78) = + libc.so.6->free(0xc) = + libc.so.6->free(0x308) = + +Note the nonsense values passed to free. The problem is that these +are not free calls at all, but malloc calls that are assigned to wrong +PLT slots due to above bug. +--- + sysdeps/linux-gnu/x86/plt.c | 38 +++++++++++++++++++++----------------- + 1 file changed, 21 insertions(+), 17 deletions(-) + +diff --git a/sysdeps/linux-gnu/x86/plt.c b/sysdeps/linux-gnu/x86/plt.c +index c860af6..97f6c3e 100644 +--- a/sysdeps/linux-gnu/x86/plt.c ++++ b/sysdeps/linux-gnu/x86/plt.c +@@ -77,6 +77,18 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + { + VECT_INIT(<e->arch.plt_map, unsigned int); + ++ if (vect_reserve(<e->arch.plt_map, vect_size(<e->plt_relocs)) < 0) { ++ fail: ++ arch_elf_destroy(lte); ++ return -1; ++ } ++ ++ { ++ unsigned int i, sz = vect_size(<e->plt_relocs); ++ for (i = 0; i < sz; ++i) ++ vect_pushback (<e->arch.plt_map, &i); ++ } ++ + /* IRELATIVE slots may make the whole situation a fair deal + * more complex. On x86{,_64}, the PLT slots are not + * presented in the order of the corresponding relocations, +@@ -114,43 +126,35 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + /* Here we scan the PLT table and initialize a map of + * relocation->slot number in lte->arch.plt_map. */ + +- size_t i; +- for (i = 0; i < vect_size(<e->plt_relocs); ++i) { ++ unsigned int i, sz = vect_size(<e->plt_relocs); ++ for (i = 0; i < sz; ++i) { + + GElf_Addr offset = x86_plt_offset(i); +- uint32_t reloc_arg = 0; + + uint8_t byte; + if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 + || byte != 0xff + || elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 + || (byte != 0xa3 && byte != 0x25)) +- goto next; ++ continue; + + /* Skip immediate argument in the instruction. */ + offset += 4; + ++ uint32_t reloc_arg; + if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 + || byte != 0x68 + || elf_read_next_u32(lte->plt_data, +- &offset, &reloc_arg) < 0) { +- reloc_arg = 0; +- goto next; +- } ++ &offset, &reloc_arg) < 0) ++ continue; + + if (lte->ehdr.e_machine == EM_386) { +- if (reloc_arg % 8 != 0) { +- reloc_arg = 0; +- goto next; +- } ++ if (reloc_arg % 8 != 0) ++ continue; + reloc_arg /= 8; + } + +- next: +- if (VECT_PUSHBACK(<e->arch.plt_map, &reloc_arg) < 0) { +- arch_elf_destroy(lte); +- return -1; +- } ++ *VECT_ELEMENT(<e->arch.plt_map, unsigned int, reloc_arg) = i; + } + + return 0; +-- +2.1.0 + diff --git a/ltrace-0.7.91-x86-unused_label.patch b/ltrace-0.7.91-x86-unused_label.patch new file mode 100644 index 0000000..e56bda2 --- /dev/null +++ b/ltrace-0.7.91-x86-unused_label.patch @@ -0,0 +1,32 @@ +From e16a28f1b6e5a15368f8ed98dc29a6da714dc5fa Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Tue, 9 Dec 2014 17:44:30 +0100 +Subject: [PATCH] Drop unused label in x86 backend + +--- + sysdeps/linux-gnu/x86/plt.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/sysdeps/linux-gnu/x86/plt.c b/sysdeps/linux-gnu/x86/plt.c +index 97f6c3e..44ea260 100644 +--- a/sysdeps/linux-gnu/x86/plt.c ++++ b/sysdeps/linux-gnu/x86/plt.c +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2013 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2013,2014 Petr Machata, Red Hat Inc. + * Copyright (C) 2004,2008,2009 Juan Cespedes + * + * This program is free software; you can redistribute it and/or +@@ -78,7 +78,6 @@ arch_elf_init(struct ltelf *lte, struct library *lib) + VECT_INIT(<e->arch.plt_map, unsigned int); + + if (vect_reserve(<e->arch.plt_map, vect_size(<e->plt_relocs)) < 0) { +- fail: + arch_elf_destroy(lte); + return -1; + } +-- +2.1.0 + diff --git a/ltrace.spec b/ltrace.spec index 5a050d3..9b45f58 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 11%{?dist} +Release: 12%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -71,6 +71,10 @@ Patch15: ltrace-0.7.91-parser-ws_after_id.patch # http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=bf82100966deda9c7d26ad085d97c08126a8ae88 Patch16: ltrace-0.7.91-ppc-bias.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1158714 +Patch17: ltrace-0.7.91-x86-plt_map.patch +Patch18: ltrace-0.7.91-x86-unused_label.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -99,6 +103,8 @@ execution of processes. %patch14 -p1 %patch15 -p1 %patch16 -p1 +%patch17 -p1 +%patch18 -p1 %build %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} @@ -123,6 +129,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Jan 7 2015 Petr Machata - 0.7.91-12 +- Add upstream fix for a bug in labeling PLT slots + (ltrace-0.7.91-x86-plt_map.patch) + * Tue Dec 9 2014 Petr Machata - 0.7.91-11 - Fix bias handling in PPC backend - Fix cloning of unresolved breakpoints in PPC backend From 1c7f1423fa715fa34785b73c0af3f10c0b2a134b Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 9 Jan 2015 01:39:10 +0100 Subject: [PATCH 021/100] Add upstream fix for support of elfutils unwinder --- ltrace-0.7.91-unwind-elfutils.patch | 427 ++++++++++++++++++++++++++++ ltrace.spec | 16 +- 2 files changed, 440 insertions(+), 3 deletions(-) create mode 100644 ltrace-0.7.91-unwind-elfutils.patch diff --git a/ltrace-0.7.91-unwind-elfutils.patch b/ltrace-0.7.91-unwind-elfutils.patch new file mode 100644 index 0000000..1e18eb4 --- /dev/null +++ b/ltrace-0.7.91-unwind-elfutils.patch @@ -0,0 +1,427 @@ +Common subdirectories: ltrace-0.7.91/config and ltrace-0.7.91-pm/config +diff -u ltrace-0.7.91/configure.ac ltrace-0.7.91-pm/configure.ac +--- ltrace-0.7.91/configure.ac 2015-01-09 00:38:17.977190726 +0100 ++++ ltrace-0.7.91-pm/configure.ac 2015-01-09 00:37:40.261910548 +0100 +@@ -128,6 +128,51 @@ + AC_CHECK_HEADERS(selinux/selinux.h) + AC_CHECK_LIB(selinux, security_get_boolean_active) + ++dnl Whether (and which) elfutils libdw.so to use for unwinding. ++AC_ARG_WITH(elfutils, ++ AS_HELP_STRING([--with-elfutils], [Use elfutils libdwfl unwinding support]), ++ [case "${withval}" in ++ (yes|no) enable_elfutils=$withval;; ++ (*) enable_elfutils=yes ++ AM_CPPFLAGS="${AM_CPPFLAGS} -I${withval}/include" ++ AM_LDFLAGS="${AM_LDFLAGS} -L${withval}/lib" ++ elfutils_LD_LIBRARY_PATH="${withval}/lib:${withval}/lib/elfutils" ++ ;; ++esac],[enable_elfutils=maybe]) ++ ++dnl Check whether we have the elfutils libdwfl.h header installed. ++saved_CPPFLAGS="${CPPFLAGS}" ++CPPFLAGS="${CPPFLAGS} ${AM_CPPFLAGS}" ++AC_CHECK_HEADERS([elfutils/libdwfl.h],[have_libdwfl_h=yes]) ++CPPFLAGS="${saved_CPPFLAGS}" ++ ++dnl And whether libdw.so provides the unwinding functions. ++saved_LDFLAGS="${LDFLAGS}" ++LDFLAGS="${LDFLAGS} ${AM_LDFLAGS}" ++AC_CHECK_LIB([dw], [dwfl_getthread_frames], [have_libdw_dwfl_frames=yes]) ++LDFLAGS="${saved_LDFLAGS}" ++ ++AC_MSG_CHECKING([whether to use elfutils libdwfl unwinding support]) ++case "${enable_elfutils}" in ++(yes|maybe) ++ if test x$have_libdwfl_h = xyes -a x$have_libdw_dwfl_frames = xyes; then ++ enable_elfutils=yes ++ elif test $enable_elfutils = maybe; then ++ enable_elfutils=no ++ else ++ AC_MSG_RESULT([$enable_elfutils]) ++ AC_MSG_ERROR([Missing elfutils/libdwfl.h or dwfl_getthread_frames not in libdw.so]) ++ fi ++ ;; ++(*) ;; ++esac ++AC_MSG_RESULT([$enable_elfutils]) ++ ++if test x"$enable_elfutils" = xyes; then ++ libdw_LIBS=-ldw ++ AC_SUBST(libdw_LIBS) ++ AC_DEFINE([HAVE_LIBDW], [1], [we have elfutils libdw]) ++fi + + # HAVE_LIBUNWIND + AC_ARG_WITH(libunwind, +@@ -193,6 +238,13 @@ + LDFLAGS="${saved_LDFLAGS}" + fi + ++if test x"$enable_elfutils" = xyes -a x"$enable_libunwind" = xyes; then ++ AC_MSG_ERROR([Cannot enable both --with-libunwind and --with-elfutils]) ++fi ++ ++if test x"$enable_elfutils" = xyes -o x"$enable_libunwind" = xyes; then ++ AC_DEFINE([HAVE_UNWINDER], [1], [we have an unwinder available]) ++fi + + saved_CPPFLAGS="${CPPFLAGS}" + saved_LDFLAGS="${LDFLAGS}" +@@ -340,6 +392,7 @@ + AC_SUBST(AM_CFLAGS) + AC_SUBST(AM_LDFLAGS) + AC_SUBST(libelf_LD_LIBRARY_PATH) ++AC_SUBST(elfutils_LD_LIBRARY_PATH) + AC_SUBST(libunwind_LD_LIBRARY_PATH) + + AC_CONFIG_FILES([ +Common subdirectories: ltrace-0.7.91/debian and ltrace-0.7.91-pm/debian +Common subdirectories: ltrace-0.7.91/etc and ltrace-0.7.91-pm/etc +diff -u ltrace-0.7.91/ltrace.1 ltrace-0.7.91-pm/ltrace.1 +--- ltrace-0.7.91/ltrace.1 2015-01-09 00:38:17.975190764 +0100 ++++ ltrace-0.7.91-pm/ltrace.1 2015-01-09 00:37:40.261910548 +0100 +@@ -196,7 +196,8 @@ + correct execution of setuid and/or setgid binaries. + .IP "\-w, --where \fInr" + Show backtrace of \fInr\fR stack frames for each traced function. This +-option enabled only if libunwind support was enabled at compile time. ++option enabled only if elfutils or libunwind support was enabled at compile ++time. + .IP "\-x \fIfilter" + A qualifying expression which modifies which symbol table entry points + to trace. The format of the filter expression is described in the +Only in ltrace-0.7.91-pm/: ltrace.1.orig +diff -u ltrace-0.7.91/Makefile.am ltrace-0.7.91-pm/Makefile.am +--- ltrace-0.7.91/Makefile.am 2015-01-09 00:38:17.965190955 +0100 ++++ ltrace-0.7.91-pm/Makefile.am 2015-01-09 00:37:40.260910568 +0100 +@@ -40,6 +40,7 @@ + $(liberty_LIBS) \ + $(libsupcxx_LIBS) \ + $(libstdcxx_LIBS) \ ++ $(libdw_LIBS) \ + $(libunwind_LIBS) \ + sysdeps/libos.la + +diff -u ltrace-0.7.91/options.c ltrace-0.7.91-pm/options.c +--- ltrace-0.7.91/options.c 2015-01-09 00:38:17.974190783 +0100 ++++ ltrace-0.7.91-pm/options.c 2015-01-09 00:37:40.261910548 +0100 +@@ -107,9 +107,9 @@ + " -T show the time spent inside each call.\n" + " -u USERNAME run command with the userid, groupid of username.\n" + " -V, --version output version information and exit.\n" +-#if defined(HAVE_LIBUNWIND) ++#if defined(HAVE_UNWINDER) + " -w, --where=NR print backtrace showing NR stack frames at most.\n" +-#endif /* defined(HAVE_LIBUNWIND) */ ++#endif /* defined(HAVE_UNWINDER) */ + " -x FILTER modify which static functions to trace.\n" + "\nReport bugs to ltrace-devel@lists.alioth.debian.org\n", + progname); +@@ -519,9 +519,9 @@ + progname = argv[0]; + options.output = stderr; + options.no_signals = 0; +-#if defined(HAVE_LIBUNWIND) ++#if defined(HAVE_UNWINDER) + options.bt_depth = -1; +-#endif /* defined(HAVE_LIBUNWIND) */ ++#endif /* defined(HAVE_UNWINDER) */ + + guess_cols(); + +@@ -545,9 +545,9 @@ + {"output", 1, 0, 'o'}, + {"version", 0, 0, 'V'}, + {"no-signals", 0, 0, 'b'}, +-# if defined(HAVE_LIBUNWIND) ++# if defined(HAVE_UNWINDER) + {"where", 1, 0, 'w'}, +-# endif /* defined(HAVE_LIBUNWIND) */ ++# endif /* defined(HAVE_UNWINDER) */ + {0, 0, 0, 0} + }; + #endif +@@ -556,7 +556,7 @@ + #ifdef USE_DEMANGLE + "C" + #endif +-#if defined(HAVE_LIBUNWIND) ++#if defined(HAVE_UNWINDER) + "w:" + #endif + "cfhiLrStTVba:A:D:e:F:l:n:o:p:s:u:x:X:"; +@@ -681,11 +681,11 @@ + "There is NO WARRANTY, to the extent permitted by law.\n"); + exit(0); + break; +-#if defined(HAVE_LIBUNWIND) ++#if defined(HAVE_UNWINDER) + case 'w': + options.bt_depth = parse_int(optarg, 'w', 1, 0); + break; +-#endif /* defined(HAVE_LIBUNWIND) */ ++#endif /* defined(HAVE_UNWINDER) */ + + case 'x': + parse_filter_chain(optarg, &options.static_filter); +Only in ltrace-0.7.91-pm/: options.c.orig +diff -u ltrace-0.7.91/options.h ltrace-0.7.91-pm/options.h +--- ltrace-0.7.91/options.h 2015-01-09 00:38:17.966190936 +0100 ++++ ltrace-0.7.91-pm/options.h 2015-01-09 00:37:40.261910548 +0100 +@@ -44,9 +44,9 @@ + size_t strlen; /* default maximum # of bytes printed in strings */ + int follow; /* trace child processes */ + int no_signals; /* don't print signals */ +-#if defined(HAVE_LIBUNWIND) ++#if defined(HAVE_UNWINDER) + int bt_depth; /* how may levels of stack frames to show */ +-#endif /* defined(HAVE_LIBUNWIND) */ ++#endif /* defined(HAVE_UNWINDER) */ + struct filter *plt_filter; + struct filter *static_filter; + +diff -u ltrace-0.7.91/output.c ltrace-0.7.91-pm/output.c +--- ltrace-0.7.91/output.c 2015-01-09 00:38:17.966190936 +0100 ++++ ltrace-0.7.91-pm/output.c 2015-01-09 00:37:40.261910548 +0100 +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + + #include "output.h" + #include "demangle.h" +@@ -567,6 +568,73 @@ + stel->out.need_delim = need_delim; + } + ++#if defined(HAVE_LIBDW) ++/* Prints information about one frame of a thread. Called by ++ dwfl_getthread_frames in output_right. Returns 1 when done (max ++ number of frames reached). Returns -1 on error. Returns 0 on ++ success (if there are more frames in the thread, call us again). */ ++static int ++frame_callback (Dwfl_Frame *state, void *arg) ++{ ++ Dwarf_Addr pc; ++ bool isactivation; ++ ++ int *frames = (int *) arg; ++ ++ if (!dwfl_frame_pc(state, &pc, &isactivation)) ++ return -1; ++ ++ if (!isactivation) ++ pc--; ++ ++ Dwfl *dwfl = dwfl_thread_dwfl(dwfl_frame_thread(state)); ++ Dwfl_Module *mod = dwfl_addrmodule(dwfl, pc); ++ const char *modname = NULL; ++ const char *symname = NULL; ++ GElf_Off off = 0; ++ if (mod != NULL) { ++ GElf_Sym sym; ++ modname = dwfl_module_info(mod, NULL, NULL, NULL, NULL, ++ NULL, NULL, NULL); ++ symname = dwfl_module_addrinfo(mod, pc, &off, &sym, ++ NULL, NULL, NULL); ++ } ++ ++ /* This mimics the output produced by libunwind below. */ ++ fprintf(options.output, " > %s(%s+0x%" PRIx64 ") [%" PRIx64 "]\n", ++ modname, symname, off, pc); ++ ++ /* See if we can extract the source line too and print it on ++ the next line if we can find it. */ ++ if (mod != NULL) { ++ Dwfl_Line *l = dwfl_module_getsrc(mod, pc); ++ if (l != NULL) { ++ int line, col; ++ line = col = -1; ++ const char *src = dwfl_lineinfo(l, NULL, &line, &col, ++ NULL, NULL); ++ if (src != NULL) { ++ fprintf(options.output, "\t%s", src); ++ if (line > 0) { ++ fprintf(options.output, ":%d", line); ++ if (col > 0) ++ fprintf(options.output, ++ ":%d", col); ++ } ++ fprintf(options.output, "\n"); ++ } ++ ++ } ++ } ++ ++ /* Max number of frames to print reached? */ ++ if ((*frames)-- == 0) ++ return 1; ++ ++ return 0; ++} ++#endif /* defined(HAVE_LIBDW) */ ++ + void + output_right(enum tof type, struct process *proc, struct library_symbol *libsym, + struct timedelta *spent) +@@ -694,6 +762,24 @@ + } + #endif /* defined(HAVE_LIBUNWIND) */ + ++#if defined(HAVE_LIBDW) ++ if (options.bt_depth > 0 && proc->leader->dwfl != NULL) { ++ int frames = options.bt_depth; ++ if (dwfl_getthread_frames(proc->leader->dwfl, proc->pid, ++ frame_callback, &frames) < 0) { ++ // Only print an error if we couldn't show anything. ++ // Otherwise just show there might be more... ++ if (frames == options.bt_depth) ++ fprintf(stderr, ++ "dwfl_getthread_frames tid %d: %s\n", ++ proc->pid, dwfl_errmsg(-1)); ++ else ++ fprintf(options.output, " > [...]\n"); ++ } ++ fprintf(options.output, "\n"); ++ } ++#endif /* defined(HAVE_LIBDW) */ ++ + current_proc = NULL; + current_column = 0; + } +Only in ltrace-0.7.91-pm/: output.c.orig +diff -u ltrace-0.7.91/proc.c ltrace-0.7.91-pm/proc.c +--- ltrace-0.7.91/proc.c 2015-01-09 00:38:17.981190650 +0100 ++++ ltrace-0.7.91-pm/proc.c 2015-01-09 00:37:40.261910548 +0100 +@@ -111,6 +111,11 @@ + if (proc->unwind_as != NULL) + unw_destroy_addr_space(proc->unwind_as); + #endif /* defined(HAVE_LIBUNWIND) */ ++ ++#if defined(HAVE_LIBDW) ++ if (proc->dwfl != NULL) ++ dwfl_end(proc->dwfl); ++#endif /* defined(HAVE_LIBDW) */ + } + + static int +@@ -172,6 +177,10 @@ + } + #endif /* defined(HAVE_LIBUNWIND) */ + ++#if defined(HAVE_LIBDW) ++ proc->dwfl = NULL; /* Initialize for leader only on first library. */ ++#endif /* defined(HAVE_LIBDW) */ ++ + return 0; + } + +@@ -887,6 +896,59 @@ + debug(DEBUG_PROCESS, "added library %s@%p (%s) to %d", + lib->soname, lib->base, lib->pathname, proc->pid); + ++#if defined(HAVE_LIBDW) ++ if (options.bt_depth > 0) { ++ /* Setup module tracking for libdwfl unwinding. */ ++ struct process *leader = proc->leader; ++ Dwfl *dwfl = leader->dwfl; ++ if (dwfl == NULL) { ++ static const Dwfl_Callbacks proc_callbacks = { ++ .find_elf = dwfl_linux_proc_find_elf, ++ .find_debuginfo = dwfl_standard_find_debuginfo ++ }; ++ dwfl = dwfl_begin(&proc_callbacks); ++ if (dwfl == NULL) ++ fprintf(stderr, ++ "Couldn't initialize libdwfl unwinding " ++ "for process %d: %s\n", leader->pid, ++ dwfl_errmsg (-1)); ++ } ++ ++ if (dwfl != NULL) { ++ dwfl_report_begin_add(dwfl); ++ if (dwfl_report_elf(dwfl, lib->soname, ++ lib->pathname, -1, ++ (GElf_Addr) lib->base, ++ false) == NULL) ++ fprintf(stderr, ++ "dwfl_report_elf %s@%p (%s) %d: %s\n", ++ lib->soname, lib->base, lib->pathname, ++ proc->pid, dwfl_errmsg (-1)); ++ dwfl_report_end(dwfl, NULL, NULL); ++ ++ if (leader->dwfl == NULL) { ++ int r = dwfl_linux_proc_attach(dwfl, ++ leader->pid, ++ true); ++ if (r == 0) ++ leader->dwfl = dwfl; ++ else { ++ const char *msg; ++ dwfl_end(dwfl); ++ if (r < 0) ++ msg = dwfl_errmsg(-1); ++ else ++ msg = strerror(r); ++ fprintf(stderr, "Couldn't initialize " ++ "libdwfl unwinding for " ++ "process %d: %s\n", ++ leader->pid, msg); ++ } ++ } ++ } ++ } ++#endif /* defined(HAVE_LIBDW) */ ++ + /* Insert breakpoints for all active (non-latent) symbols. */ + struct library_symbol *libsym = NULL; + while ((libsym = library_each_symbol(lib, libsym, +diff -u ltrace-0.7.91/proc.c.orig ltrace-0.7.91-pm/proc.c.orig +--- ltrace-0.7.91/proc.c.orig 2013-10-23 01:01:15.000000000 +0200 ++++ ltrace-0.7.91-pm/proc.c.orig 2015-01-09 00:37:24.120218624 +0100 +@@ -220,9 +220,11 @@ + goto fail; + } + +- if (proc->leader != proc) +- return 0; +- if (process_init_main(proc) < 0) { ++ if (proc->leader != proc) { ++ proc->e_machine = proc->leader->e_machine; ++ proc->e_class = proc->leader->e_class; ++ get_arch_dep(proc); ++ } else if (process_init_main(proc) < 0) { + process_bare_destroy(proc, 0); + goto fail; + } +diff -u ltrace-0.7.91/proc.h ltrace-0.7.91-pm/proc.h +--- ltrace-0.7.91/proc.h 2015-01-09 00:38:17.966190936 +0100 ++++ ltrace-0.7.91-pm/proc.h 2015-01-09 00:37:40.261910548 +0100 +@@ -28,6 +28,10 @@ + #include + #include + ++#if defined(HAVE_LIBDW) ++# include ++#endif ++ + #if defined(HAVE_LIBUNWIND) + # include + #endif /* defined(HAVE_LIBUNWIND) */ +@@ -113,6 +117,11 @@ + short e_machine; + char e_class; + ++#if defined(HAVE_LIBDW) ++ /* Unwind info for leader, NULL for non-leader procs. */ ++ Dwfl *dwfl; ++#endif /* defined(HAVE_LIBDW) */ ++ + #if defined(HAVE_LIBUNWIND) + /* libunwind address space */ + unw_addr_space_t unwind_as; +Only in ltrace-0.7.91-pm/: proc.h.orig +Common subdirectories: ltrace-0.7.91/sysdeps and ltrace-0.7.91-pm/sysdeps +Common subdirectories: ltrace-0.7.91/testsuite and ltrace-0.7.91-pm/testsuite diff --git a/ltrace.spec b/ltrace.spec index 9b45f58..fec1494 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,13 +1,14 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 12%{?dist} +Release: 13%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers BuildRequires: elfutils-devel dejagnu BuildRequires: libselinux-devel +BuildRequires: autoconf automake libtool # Note: this URL needs to be updated for each release, as the file # number changes for each file. Full list of released files is at: @@ -75,6 +76,9 @@ Patch16: ltrace-0.7.91-ppc-bias.patch Patch17: ltrace-0.7.91-x86-plt_map.patch Patch18: ltrace-0.7.91-x86-unused_label.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1170315 +Patch19: ltrace-0.7.91-unwind-elfutils.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -105,8 +109,10 @@ execution of processes. %patch16 -p1 %patch17 -p1 %patch18 -p1 +%patch19 -p1 %build +autoreconf -i %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} make %{?_smp_mflags} @@ -129,6 +135,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Jan 9 2015 Petr Machata - 0.7.91-13 +- Add upstream fix for support of elfutils unwinder + (ltrace-0.7.91-unwind-elfutils.patch) + * Wed Jan 7 2015 Petr Machata - 0.7.91-12 - Add upstream fix for a bug in labeling PLT slots (ltrace-0.7.91-x86-plt_map.patch) @@ -418,7 +428,7 @@ echo ====================TESTING END===================== - e_entry patch: use elf's e_entry field instead of looking up _start symbol, which failed on stripped binaries. -* Tue May 3 2006 Petr Machata - 0.4-1.5 +* Wed May 3 2006 Petr Machata - 0.4-1.5 - Correct a typo that prevented the inclusion of "demangle.h" - Adding -Wl,-z,relro @@ -518,7 +528,7 @@ echo ====================TESTING END===================== * Sun Jun 24 2001 Elliot Lee - Bump release + rebuild. -* Thu Aug 2 2000 Tim Waugh +* Wed Aug 2 2000 Tim Waugh - fix off-by-one problem in checking syscall number * Wed Jul 12 2000 Prospector From efe3b675aae3b1c398db1f5f42d1f59c1a372e71 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Fri, 9 Jan 2015 01:58:13 +0100 Subject: [PATCH 022/100] Fix a compilation error caused by the previous patch --- ltrace-0.7.91-unwind-elfutils.patch | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/ltrace-0.7.91-unwind-elfutils.patch b/ltrace-0.7.91-unwind-elfutils.patch index 1e18eb4..6a855a8 100644 --- a/ltrace-0.7.91-unwind-elfutils.patch +++ b/ltrace-0.7.91-unwind-elfutils.patch @@ -425,3 +425,16 @@ diff -u ltrace-0.7.91/proc.h ltrace-0.7.91-pm/proc.h Only in ltrace-0.7.91-pm/: proc.h.orig Common subdirectories: ltrace-0.7.91/sysdeps and ltrace-0.7.91-pm/sysdeps Common subdirectories: ltrace-0.7.91/testsuite and ltrace-0.7.91-pm/testsuite +diff -up ltrace-0.7.91/proc.c\~ ltrace-0.7.91/proc.c +--- ltrace-0.7.91/proc.c~ 2015-01-09 01:55:38.289864078 +0100 ++++ ltrace-0.7.91/proc.c 2015-01-09 01:56:29.818881935 +0100 +@@ -918,7 +918,8 @@ proc_add_library(struct process *proc, s + dwfl_report_begin_add(dwfl); + if (dwfl_report_elf(dwfl, lib->soname, + lib->pathname, -1, +- (GElf_Addr) lib->base, ++ /* XXX double cast */ ++ (GElf_Addr) (uintptr_t) lib->base, + false) == NULL) + fprintf(stderr, + "dwfl_report_elf %s@%p (%s) %d: %s\n", From 44de39e5d1d6910030f17a159e564874b7fb1618 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 8 Apr 2015 15:10:37 +0200 Subject: [PATCH 023/100] Fix tracing of multi-threaded processes without -f --- ltrace-0.7.91-multithread-no-f-1.patch | 175 +++++++++++++++++++++++++ ltrace-0.7.91-multithread-no-f-2.patch | 50 +++++++ ltrace.spec | 10 +- 3 files changed, 234 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-multithread-no-f-1.patch create mode 100644 ltrace-0.7.91-multithread-no-f-2.patch diff --git a/ltrace-0.7.91-multithread-no-f-1.patch b/ltrace-0.7.91-multithread-no-f-1.patch new file mode 100644 index 0000000..0589f5e --- /dev/null +++ b/ltrace-0.7.91-multithread-no-f-1.patch @@ -0,0 +1,175 @@ +From 4724bd5a4a19db117a1d280b9d1a3508fd4e03fa Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Wed, 8 Apr 2015 07:11:52 -0400 +Subject: [PATCH 1/2] Convert main-threaded test case to new style + +--- + testsuite/ltrace.main/Makefile.am | 4 +- + testsuite/ltrace.main/main-threaded.c | 30 ---------- + testsuite/ltrace.main/main-threaded.exp | 103 ++++++++++++++++++++------------ + 3 files changed, 66 insertions(+), 71 deletions(-) + delete mode 100644 testsuite/ltrace.main/main-threaded.c + +diff --git a/testsuite/ltrace.main/Makefile.am b/testsuite/ltrace.main/Makefile.am +index 23ab8ab..06ad613 100644 +--- a/testsuite/ltrace.main/Makefile.am ++++ b/testsuite/ltrace.main/Makefile.am +@@ -1,4 +1,4 @@ +-# Copyright (C) 1992 - 2001, 2012, 2013 Free Software Foundation, Inc. ++# Copyright (C) 1992 - 2001, 2012, 2013, 2015 Free Software Foundation, Inc. + # + # This program is free software; you can redistribute it and/or modify + # it under the terms of the GNU General Public License as published by +@@ -17,7 +17,7 @@ + + EXTRA_DIST = branch_func.c branch_func.exp filters.exp hello-vfork.c \ + hello-vfork.exp main.c main.exp main-internal.exp main-lib.c \ +- main-threaded.c main-threaded.exp main-vfork.c main-vfork.exp \ ++ main-threaded.exp main-vfork.c main-vfork.exp \ + parameters.c parameters.conf parameters.exp parameters-lib.c \ + parameters2.exp parameters3.exp signals.c signals.exp \ + system_calls.c system_calls.exp system_call_params.exp +diff --git a/testsuite/ltrace.main/main-threaded.c b/testsuite/ltrace.main/main-threaded.c +deleted file mode 100644 +index 2992d1e..0000000 +--- a/testsuite/ltrace.main/main-threaded.c ++++ /dev/null +@@ -1,29 +0,0 @@ +-#include +- +-extern void print (char *); +- +-#define PRINT_LOOP 10 +- +-void * +-th_main (void *arg) +-{ +- int i; +- for (i=0; i. ++# This file is part of ltrace. ++# Copyright (C) 2011, 2015 Petr Machata, Red Hat Inc. ++# Copyright (C) 2006 Yao Qi . ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of the ++# License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++# 02110-1301 USA ++ ++set libprint [ltraceCompile libprint.so [ltraceSource c { ++ #include ++ ++ void ++ print(char* s) ++ { ++ printf("%s\n",s); ++ } ++}]] ++ ++set bin [ltraceCompile {} $libprint -lpthread [ltraceSource c { ++ #include ++ ++ extern void print (char *); ++ ++ #define PRINT_LOOP 10 ++ ++ void * ++ th_main (void *arg) ++ { ++ int i; ++ for (i=0; i +Date: Wed, 8 Apr 2015 07:14:10 -0400 +Subject: [PATCH 2/2] Fix tracing multi-threaded processes without -f + +- In handle_syscall, we avoid touching stack of ignored processes. + But in handle_sysret, we require a sysret-like stack entry even + for ignored processes, even though we then go ahead to not act + on that stack entry. Instead, for ignored processes, avoid looking + at stack trace at all. +--- + handle_event.c | 10 +++++----- + testsuite/ltrace.main/main-threaded.exp | 1 + + 2 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/handle_event.c b/handle_event.c +index 6fa7e98..c2550ad 100644 +--- a/handle_event.c ++++ b/handle_event.c +@@ -619,12 +619,12 @@ handle_x_sysret(Event *event, char *(*name_cb)(struct process *, int)) + debug(DEBUG_FUNCTION, "handle_x_sysret(pid=%d, sysnum=%d)", + event->proc->pid, event->e_un.sysnum); + +- unsigned d = event->proc->callstack_depth; +- assert(d > 0); +- struct callstack_element *elem = &event->proc->callstack[d - 1]; +- assert(elem->is_syscall); +- + if (event->proc->state != STATE_IGNORED) { ++ unsigned d = event->proc->callstack_depth; ++ assert(d > 0); ++ struct callstack_element *elem = &event->proc->callstack[d - 1]; ++ assert(elem->is_syscall); ++ + struct timedelta spent = calc_time_spent(elem->enter_time); + if (options.syscalls) + output_syscall_right(event->proc, +diff --git a/testsuite/ltrace.main/main-threaded.exp b/testsuite/ltrace.main/main-threaded.exp +index cead82d..aca7afd 100644 +--- a/testsuite/ltrace.main/main-threaded.exp ++++ b/testsuite/ltrace.main/main-threaded.exp +@@ -60,5 +60,6 @@ set bin [ltraceCompile {} $libprint -lpthread [ltraceSource c { + }]] + + ltraceMatch1 [ltraceRun -f -l libprint.so -- $bin] {print\(} == 30 ++ltraceMatch1 [ltraceRun -L -- $bin] exited == 1 + + ltraceDone +-- +2.1.0 diff --git a/ltrace.spec b/ltrace.spec index fec1494..6524ace 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 13%{?dist} +Release: 14%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -79,6 +79,12 @@ Patch18: ltrace-0.7.91-x86-unused_label.patch # https://bugzilla.redhat.com/show_bug.cgi?id=1170315 Patch19: ltrace-0.7.91-unwind-elfutils.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1208351 +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=4724bd5a4a19db117a1d280b9d1a3508fd4e03fa +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=72ee29639c55b5942bc07c8ed0013005f8fc5a97 +Patch20: ltrace-0.7.91-multithread-no-f-1.patch +Patch21: ltrace-0.7.91-multithread-no-f-2.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -110,6 +116,8 @@ execution of processes. %patch17 -p1 %patch18 -p1 %patch19 -p1 +%patch20 -p1 +%patch21 -p1 %build autoreconf -i From dd8ca09a5f793990bf24e528bc4f68198942843c Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 8 Apr 2015 15:12:40 +0200 Subject: [PATCH 024/100] Add changelog --- ltrace.spec | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ltrace.spec b/ltrace.spec index 6524ace..6fcd6eb 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -143,6 +143,11 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Apr 8 2015 Petr Machata - 0.7.91-14 +- Add upstream fixes for tracing multi-threaded processes without -f + (ltrace-0.7.91-multithread-no-f-1.patch, + ltrace-0.7.91-multithread-no-f-2.patch) + * Fri Jan 9 2015 Petr Machata - 0.7.91-13 - Add upstream fix for support of elfutils unwinder (ltrace-0.7.91-unwind-elfutils.patch) From 091cc6df51bec89c67e90b878411fb401da3586e Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Wed, 8 Apr 2015 16:45:34 +0200 Subject: [PATCH 025/100] Fix test suite warnings --- ltrace-0.7.91-testsuite-includes-2.patch | 48 +++++ ltrace-0.7.91-testsuite-includes.patch | 216 +++++++++++++++++++++++ ltrace.spec | 15 +- 3 files changed, 278 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-testsuite-includes-2.patch create mode 100644 ltrace-0.7.91-testsuite-includes.patch diff --git a/ltrace-0.7.91-testsuite-includes-2.patch b/ltrace-0.7.91-testsuite-includes-2.patch new file mode 100644 index 0000000..100443a --- /dev/null +++ b/ltrace-0.7.91-testsuite-includes-2.patch @@ -0,0 +1,48 @@ +From 57dbe34ea7aa54b97e11406e1cfb2e427a68779e Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Wed, 8 Apr 2015 16:04:13 +0200 +Subject: [PATCH] Fix warnings in compilation of test-suite cases + +--- + testsuite/ltrace.main/signals.c | 5 +++-- + testsuite/ltrace.minor/wchar.exp | 3 ++- + testsuite/ltrace.torture/signals.c | 5 +++-- + 3 files changed, 8 insertions(+), 5 deletions(-) + +diff --git a/testsuite/ltrace.main/signals.c b/testsuite/ltrace.main/signals.c +index a02e795..ab23fc7 100644 +--- a/testsuite/ltrace.main/signals.c ++++ b/testsuite/ltrace.main/signals.c +@@ -2,9 +2,10 @@ + Objectives : Verify that ltrace can trace user defined signal. + This file was written by Yao Qi . */ + +-#include +-#include ++#include ++#include + #include ++#include + + #define LOOP 7 + +diff --git a/testsuite/ltrace.torture/signals.c b/testsuite/ltrace.torture/signals.c +index b786c81..c66416e 100644 +--- a/testsuite/ltrace.torture/signals.c ++++ b/testsuite/ltrace.torture/signals.c +@@ -2,9 +2,10 @@ + Objectives : Verify that ltrace can trace user defined signal. + This file was written by Yao Qi . */ + +-#include +-#include ++#include ++#include + #include ++#include + + #define LOOP 20 + +-- +2.3.5 + diff --git a/ltrace-0.7.91-testsuite-includes.patch b/ltrace-0.7.91-testsuite-includes.patch new file mode 100644 index 0000000..0c5a324 --- /dev/null +++ b/ltrace-0.7.91-testsuite-includes.patch @@ -0,0 +1,216 @@ +From 694d19ff14017926454771cbb63a22355b72f1bf Mon Sep 17 00:00:00 2001 +From: Faraz Shahbazker +Date: Tue, 3 Feb 2015 13:07:55 -0800 +Subject: [PATCH] Fix missing includes and return statements in test sources + +Fix warnings while compiling test cases by adding missing #includes and +return statements. Missing arguments provided for functions wait()/wcswidth() +--- + testsuite/ltrace.main/filters.exp | 1 + + testsuite/ltrace.main/main-internal.exp | 4 +++- + testsuite/ltrace.main/main-threaded.c | 1 + + testsuite/ltrace.main/parameters.c | 1 + + testsuite/ltrace.main/parameters2.exp | 2 +- + testsuite/ltrace.main/parameters3.exp | 2 ++ + testsuite/ltrace.main/system_call_params.exp | 4 ++++ + testsuite/ltrace.minor/attach-process.exp | 1 + + testsuite/ltrace.minor/libdl-simple.c | 2 ++ + testsuite/ltrace.minor/time-record.c | 1 + + testsuite/ltrace.minor/trace-clone.c | 2 ++ + testsuite/ltrace.minor/trace-fork.c | 4 +++- + testsuite/ltrace.minor/wchar.exp | 3 ++- + testsuite/ltrace.torture/vfork-thread.c | 1 + + 14 files changed, 25 insertions(+), 4 deletions(-) + +diff --git a/testsuite/ltrace.main/filters.exp b/testsuite/ltrace.main/filters.exp +index 988346f..f7f4140 100644 +--- a/testsuite/ltrace.main/filters.exp ++++ b/testsuite/ltrace.main/filters.exp +@@ -22,6 +22,7 @@ set libfilt1 [ltraceCompile libfilt1.so [ltraceSource c { + }]] + + set libfilt2 [ltraceCompile libfilt2.so [ltraceSource c { ++ #include + void func2(void) { puts("func2"); } + }]] + +diff --git a/testsuite/ltrace.main/main-internal.exp b/testsuite/ltrace.main/main-internal.exp +index 0ca5e14..112c69b 100644 +--- a/testsuite/ltrace.main/main-internal.exp ++++ b/testsuite/ltrace.main/main-internal.exp +@@ -19,11 +19,13 @@ + set bin [ltraceCompile {} [ltraceSource c { + __attribute__((noinline)) void this(void) {} + __attribute__((noinline)) void that(void) {} +- int main(int i) { ++ int main() { ++ int i; + for (i = 0; i < 12; ++i) { + this(); + that(); + } ++ return 0; + } + }]] + +diff --git a/testsuite/ltrace.main/parameters.c b/testsuite/ltrace.main/parameters.c +index a3d8bb5..aa862b9 100644 +--- a/testsuite/ltrace.main/parameters.c ++++ b/testsuite/ltrace.main/parameters.c +@@ -17,6 +17,7 @@ void func_intptr_ret(int *i); + int func_strlen(char*); + void func_strfixed(char*); + void func_ppp(int***); ++void func_string(char*); + void func_stringp(char**); + void func_short(short, short); + void func_ushort(unsigned short, unsigned short); +diff --git a/testsuite/ltrace.main/parameters2.exp b/testsuite/ltrace.main/parameters2.exp +index 9850079..1c7b3b4 100644 +--- a/testsuite/ltrace.main/parameters2.exp ++++ b/testsuite/ltrace.main/parameters2.exp +@@ -17,7 +17,7 @@ + # 02110-1301 USA + + set trivial [ltraceCompile {} [ltraceSource c { +- int main(void) {} ++ int main(void) {return 0;} + }]] + + ltraceMatch1 [ltraceRun -L -F [ltraceSource conf { +diff --git a/testsuite/ltrace.main/parameters3.exp b/testsuite/ltrace.main/parameters3.exp +index 693c219..f6d9116 100644 +--- a/testsuite/ltrace.main/parameters3.exp ++++ b/testsuite/ltrace.main/parameters3.exp +@@ -29,8 +29,10 @@ set liba [ltraceCompile liba.so [ltraceSource c { + }]] + + set bin [ltraceCompile {} $liba [ltraceSource c { ++ extern void fun(void); + int main(void) { + fun(); ++ return 0; + } + }]] + +diff --git a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp +index 2ccf840..f3a55d2 100644 +--- a/testsuite/ltrace.main/system_call_params.exp ++++ b/testsuite/ltrace.main/system_call_params.exp +@@ -17,12 +17,15 @@ + # 02110-1301 USA + + set bin [ltraceCompile {} [ltraceSource c { ++ #ifndef _GNU_SOURCE + #define _GNU_SOURCE ++ #endif + #include + #include + #include + #include + #include /* For SYS_xxx definitions */ ++ #include + + #ifndef SYS_open + # if defined(__aarch64__) +@@ -38,6 +41,7 @@ set bin [ltraceCompile {} [ltraceSource c { + syscall(SYS_open, "/some/path", O_RDONLY); + write(1, "something", 10); + mount("source", "target", "filesystemtype", 0, 0); ++ return 0; + } + }]] + +diff --git a/testsuite/ltrace.minor/attach-process.exp b/testsuite/ltrace.minor/attach-process.exp +index 2c7d20c..c050f21 100644 +--- a/testsuite/ltrace.minor/attach-process.exp ++++ b/testsuite/ltrace.minor/attach-process.exp +@@ -21,6 +21,7 @@ set bin [ltraceCompile {} [ltraceSource c { + int main(void) { + sleep(5); + sleep(1); ++ return 0; + } + }]] + +diff --git a/testsuite/ltrace.minor/libdl-simple.c b/testsuite/ltrace.minor/libdl-simple.c +index 0bef5cf..b1be002 100644 +--- a/testsuite/ltrace.minor/libdl-simple.c ++++ b/testsuite/ltrace.minor/libdl-simple.c +@@ -1,6 +1,7 @@ + #include + #include + #include ++#include + + int main(int argc, char **argv) { + void *handle; +@@ -21,4 +22,5 @@ int main(int argc, char **argv) { + + printf("%d\n", test(5)); + dlclose(handle); ++ return 0; + } +diff --git a/testsuite/ltrace.minor/time-record.c b/testsuite/ltrace.minor/time-record.c +index a66b838..7d5e5e3 100644 +--- a/testsuite/ltrace.minor/time-record.c ++++ b/testsuite/ltrace.minor/time-record.c +@@ -5,6 +5,7 @@ + This file was written by Yao Qi . */ + #include + #include ++#include + + #define SLEEP_COUNT 2 + #define NANOSLEEP_COUNT 50 +diff --git a/testsuite/ltrace.minor/trace-clone.c b/testsuite/ltrace.minor/trace-clone.c +index ded930c..6aab235 100644 +--- a/testsuite/ltrace.minor/trace-clone.c ++++ b/testsuite/ltrace.minor/trace-clone.c +@@ -3,7 +3,9 @@ + clone called. + + This file was written by Yao Qi . */ ++#ifndef _GNU_SOURCE + #define _GNU_SOURCE ++#endif + #include + #include + #include +diff --git a/testsuite/ltrace.minor/trace-fork.c b/testsuite/ltrace.minor/trace-fork.c +index c5f0c71..9611184 100644 +--- a/testsuite/ltrace.minor/trace-fork.c ++++ b/testsuite/ltrace.minor/trace-fork.c +@@ -6,6 +6,8 @@ + + #include + #include ++#include ++#include + + void + child () +@@ -27,7 +29,7 @@ main () + else + { + printf("My child pid is %d\n",pid); +- wait(); ++ wait(NULL); + } + return 0; + } +diff --git a/testsuite/ltrace.torture/vfork-thread.c b/testsuite/ltrace.torture/vfork-thread.c +index f909bd3..4c118a6 100644 +--- a/testsuite/ltrace.torture/vfork-thread.c ++++ b/testsuite/ltrace.torture/vfork-thread.c +@@ -13,6 +13,7 @@ routine (void *data) + puts ("bleble"); + sleep (1); + } ++ return NULL; + } + + +-- +2.1.0 + diff --git a/ltrace.spec b/ltrace.spec index 6fcd6eb..0846c0b 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 14%{?dist} +Release: 15%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -85,6 +85,12 @@ Patch19: ltrace-0.7.91-unwind-elfutils.patch Patch20: ltrace-0.7.91-multithread-no-f-1.patch Patch21: ltrace-0.7.91-multithread-no-f-2.patch +# Fix problems with building a number of test cases. +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=694d19ff14017926454771cbb63a22355b72f1bf +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=a3a03622fb4ca9772dca13eae724a94ba1e728f4 +Patch22: ltrace-0.7.91-testsuite-includes.patch +Patch23: ltrace-0.7.91-testsuite-includes-2.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -118,6 +124,8 @@ execution of processes. %patch19 -p1 %patch20 -p1 %patch21 -p1 +%patch22 -p1 +%patch23 -p1 %build autoreconf -i @@ -143,6 +151,11 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Apr 8 2015 Petr Machata - 0.7.91-15 +- Add upstream fixes for compilation of test cases + (ltrace-0.7.91-testsuite-includes.patch, + ltrace-0.7.91-testsuite-includes-2.patch) + * Wed Apr 8 2015 Petr Machata - 0.7.91-14 - Add upstream fixes for tracing multi-threaded processes without -f (ltrace-0.7.91-multithread-no-f-1.patch, From 1fa810569727fd901081338bc43115d0e437c479 Mon Sep 17 00:00:00 2001 From: Petr Machata Date: Mon, 13 Apr 2015 10:23:43 +0200 Subject: [PATCH 026/100] Fix a FTBFS on powerpc64le --- ltrace-0.7.91-ppc64le-configure.patch | 44 +++++++++++++++++++++++++++ ltrace.spec | 11 ++++++- 2 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-ppc64le-configure.patch diff --git a/ltrace-0.7.91-ppc64le-configure.patch b/ltrace-0.7.91-ppc64le-configure.patch new file mode 100644 index 0000000..74f0987 --- /dev/null +++ b/ltrace-0.7.91-ppc64le-configure.patch @@ -0,0 +1,44 @@ +From eea6091f8672b01f7f022b0fc367e0f568225ffc Mon Sep 17 00:00:00 2001 +From: Petr Machata +Date: Fri, 8 Aug 2014 17:09:58 +0200 +Subject: [PATCH] Recognize powerpc64le in configure + +--- + configure.ac | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 4f360c8..6fe5e3b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -43,7 +43,7 @@ case "${host_cpu}" in + arm*|sa110) HOST_CPU="arm" ;; + cris*) HOST_CPU="cris" ;; + mips*) HOST_CPU="mips" ;; +- powerpc|powerpc64) HOST_CPU="ppc" ;; ++ powerpc|powerpc64|powerpc64le) HOST_CPU="ppc" ;; + sun4u|sparc64) HOST_CPU="sparc" ;; + s390x) HOST_CPU="s390" ;; + i?86|x86_64) HOST_CPU="x86" ;; +@@ -210,12 +210,12 @@ AC_MSG_RESULT([$enable_libunwind]) + + if test x"$enable_libunwind" = xyes; then + case "${host_cpu}" in +- arm*|sa110) UNWIND_ARCH="arm" ;; +- i?86) UNWIND_ARCH="x86" ;; +- powerpc) UNWIND_ARCH="ppc32" ;; +- powerpc64) UNWIND_ARCH="ppc64" ;; +- mips*) UNWIND_ARCH="mips" ;; +- *) UNWIND_ARCH="${host_cpu}" ;; ++ arm*|sa110) UNWIND_ARCH="arm" ;; ++ i?86) UNWIND_ARCH="x86" ;; ++ powerpc) UNWIND_ARCH="ppc32" ;; ++ powerpc64|powerpc64le) UNWIND_ARCH="ppc64" ;; ++ mips*) UNWIND_ARCH="mips" ;; ++ *) UNWIND_ARCH="${host_cpu}" ;; + esac + + saved_LDFLAGS="${LDFLAGS}" +-- +2.1.0 + diff --git a/ltrace.spec b/ltrace.spec index 0846c0b..7bb13de 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 15%{?dist} +Release: 16%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -91,6 +91,10 @@ Patch21: ltrace-0.7.91-multithread-no-f-2.patch Patch22: ltrace-0.7.91-testsuite-includes.patch Patch23: ltrace-0.7.91-testsuite-includes-2.patch +# https://bugzilla.redhat.com/show_bug.cgi?id=1210653 +# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=eea6091f8672b01f7f022b0fc367e0f568225ffc +Patch24: ltrace-0.7.91-ppc64le-configure.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -126,6 +130,7 @@ execution of processes. %patch21 -p1 %patch22 -p1 %patch23 -p1 +%patch24 -p1 %build autoreconf -i @@ -151,6 +156,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Mon Apr 13 2015 Petr Machata - 0.7.91-16 +- Add upstream fix to map of powerpc64le architecture to ppc backend. + (ltrace-0.7.91-ppc64le-configure.patch) + * Wed Apr 8 2015 Petr Machata - 0.7.91-15 - Add upstream fixes for compilation of test cases (ltrace-0.7.91-testsuite-includes.patch, From 12c718e6e75ab9c78dcdff188d4d41e1a21230eb Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 19:02:18 +0000 Subject: [PATCH 027/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 7bb13de..60c8b8b 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 16%{?dist} +Release: 17%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -156,6 +156,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 0.7.91-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Mon Apr 13 2015 Petr Machata - 0.7.91-16 - Add upstream fix to map of powerpc64le architecture to ppc backend. (ltrace-0.7.91-ppc64le-configure.patch) From 20cb2cffcbee920812157a54af31489b54755667 Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Thu, 4 Feb 2016 04:30:56 +0000 Subject: [PATCH 028/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 60c8b8b..375e1e5 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 17%{?dist} +Release: 18%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -156,6 +156,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Feb 04 2016 Fedora Release Engineering - 0.7.91-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Wed Jun 17 2015 Fedora Release Engineering - 0.7.91-17 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From 8a08e1b4d72cdecaabdf34a0a803008b28eff58d Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 19 Feb 2016 14:22:24 -0700 Subject: [PATCH 029/100] * Thu Feb 19 2016 Jeff Law - 0.7.91-19 - Fix FTBFS due to testsuite failure (#1307754) . Add missing files to %doc --- ltrace-rh1307754.patch | 12 ++++++++++++ ltrace.spec | 10 ++++++++-- 2 files changed, 20 insertions(+), 2 deletions(-) create mode 100644 ltrace-rh1307754.patch diff --git a/ltrace-rh1307754.patch b/ltrace-rh1307754.patch new file mode 100644 index 0000000..ac3560a --- /dev/null +++ b/ltrace-rh1307754.patch @@ -0,0 +1,12 @@ +diff -Nrup a/testsuite/ltrace.main/system_calls.exp b/testsuite/ltrace.main/system_calls.exp +--- a/testsuite/ltrace.main/system_calls.exp 2016-02-17 19:39:51.433134376 -0700 ++++ b/testsuite/ltrace.main/system_calls.exp 2016-02-17 19:40:26.220402747 -0700 +@@ -133,7 +133,7 @@ Match [Diff [Calls [ltraceRun -L -S -- $ + { {^write$} == 1 } + { {^unlink(at)?$} >= 2 } + { {^open(at)?$} == 1 } +- { {^(new|f)?stat(64)?$} == 1 } ++ { {^(new|f)?stat(64)?$} >= 1 } + { {^close$} == 1 } + { {^getcwd$} == 1 } + { {^chdir$} == 1 } diff --git a/ltrace.spec b/ltrace.spec index 375e1e5..7b9826e 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 18%{?dist} +Release: 19%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -95,6 +95,8 @@ Patch23: ltrace-0.7.91-testsuite-includes-2.patch # http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=eea6091f8672b01f7f022b0fc367e0f568225ffc Patch24: ltrace-0.7.91-ppc64le-configure.patch +Patch25: ltrace-rh1307754.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -131,6 +133,7 @@ execution of processes. %patch22 -p1 %patch23 -p1 %patch24 -p1 +%patch25 -p1 %build autoreconf -i @@ -149,13 +152,16 @@ echo ====================TESTING END===================== %files %defattr(-,root,root) -%doc NEWS +%doc NEWS COPYING CREDITS INSTALL README TODO %{_bindir}/ltrace %{_mandir}/man1/ltrace.1* %{_mandir}/man5/ltrace.conf.5* %{_datadir}/ltrace %changelog +* Thu Feb 19 2016 Jeff Law - 0.7.91-19 +- Fix FTBFS due to testsuite failure (#1307754) . Add missing files to %doc + * Thu Feb 04 2016 Fedora Release Engineering - 0.7.91-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From bafda20792fcaf71949a116dc5c8565e9ebb648e Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 20 Jul 2016 09:43:25 -0600 Subject: [PATCH 030/100] - Fix FTBFS due to new gcc 6 warnings, deprecated readdir_r, and bogus chunk in unwind-elf patch. (#1347879) --- ltrace-0.7.91-tautology.patch | 96 +++++++++++++++++++++++++++++ ltrace-0.7.91-unwind-elfutils.patch | 18 ------ ltrace.spec | 11 +++- 3 files changed, 105 insertions(+), 20 deletions(-) create mode 100644 ltrace-0.7.91-tautology.patch diff --git a/ltrace-0.7.91-tautology.patch b/ltrace-0.7.91-tautology.patch new file mode 100644 index 0000000..24ff020 --- /dev/null +++ b/ltrace-0.7.91-tautology.patch @@ -0,0 +1,96 @@ +diff -r -U3 -p ltrace-0.7.91.orig/filter.c ltrace-0.7.91.dj/filter.c +--- ltrace-0.7.91.orig/filter.c 2012-12-16 20:53:44.000000000 -0500 ++++ ltrace-0.7.91.dj/filter.c 2016-06-17 19:07:23.678490985 -0400 +@@ -79,7 +79,7 @@ filter_lib_matcher_name_init(struct filt + { + switch (type) { + case FLM_MAIN: +- assert(type != type); ++ //assert(type != type); + abort(); + + case FLM_SONAME: +@@ -137,7 +137,7 @@ matcher_matches_library(struct filter_li + case FLM_MAIN: + return lib->type == LT_LIBTYPE_MAIN; + } +- assert(matcher->type != matcher->type); ++ //assert(matcher->type != matcher->type); + abort(); + } + +Only in ltrace-0.7.91.dj/: filter.c~ +diff -r -U3 -p ltrace-0.7.91.orig/sysdeps/linux-gnu/proc.c ltrace-0.7.91.dj/sysdeps/linux-gnu/proc.c +--- ltrace-0.7.91.orig/sysdeps/linux-gnu/proc.c 2013-10-11 15:27:11.000000000 -0400 ++++ ltrace-0.7.91.dj/sysdeps/linux-gnu/proc.c 2016-06-17 18:59:42.333774042 -0400 +@@ -242,9 +242,10 @@ process_tasks(pid_t pid, pid_t **ret_tas + size_t alloc = 0; + + while (1) { +- struct dirent entry; + struct dirent *result; +- if (readdir_r(d, &entry, &result) != 0) { ++ errno = 0; ++ result = readdir(d); ++ if (result == NULL && errno != 0) { + fail: + free(tasks); + closedir(d); +Only in ltrace-0.7.91.dj/sysdeps/linux-gnu: proc.c~ +diff -r -U3 -p ltrace-0.7.91.orig/sysdeps/linux-gnu/x86/fetch.c ltrace-0.7.91.dj/sysdeps/linux-gnu/x86/fetch.c +--- ltrace-0.7.91.orig/sysdeps/linux-gnu/x86/fetch.c 2013-10-24 08:33:35.000000000 -0400 ++++ ltrace-0.7.91.dj/sysdeps/linux-gnu/x86/fetch.c 2016-06-17 18:52:33.962842191 -0400 +@@ -523,7 +523,7 @@ classify(struct process *proc, struct fe + + default: + /* Unsupported type. */ +- assert(info->type != info->type); ++ //assert(info->type != info->type); + abort(); + } + abort(); +Only in ltrace-0.7.91.dj/sysdeps/linux-gnu/x86: fetch.c~ +diff -r -U3 -p ltrace-0.7.91.orig/sysdeps/linux-gnu/x86/trace.c ltrace-0.7.91.dj/sysdeps/linux-gnu/x86/trace.c +--- ltrace-0.7.91.orig/sysdeps/linux-gnu/x86/trace.c 2012-12-16 20:53:45.000000000 -0500 ++++ ltrace-0.7.91.dj/sysdeps/linux-gnu/x86/trace.c 2016-06-17 18:52:16.699844065 -0400 +@@ -145,7 +145,7 @@ arch_type_sizeof(struct process *proc, s + return (size_t)-2; + + default: +- assert(info->type != info->type); ++ //assert(info->type != info->type); + abort(); + } + } +@@ -158,7 +158,7 @@ arch_type_alignof(struct process *proc, + + switch (info->type) { + default: +- assert(info->type != info->type); ++ //assert(info->type != info->type); + abort(); + break; + +Only in ltrace-0.7.91.dj/sysdeps/linux-gnu/x86: trace.c~ +diff -r -U3 -p ltrace-0.7.91.orig/value.c ltrace-0.7.91.dj/value.c +--- ltrace-0.7.91.orig/value.c 2013-10-10 08:43:55.000000000 -0400 ++++ ltrace-0.7.91.dj/value.c 2016-06-17 19:11:43.441047589 -0400 +@@ -363,7 +363,7 @@ value_set_word(struct value *value, long + u.u64 = word; + break; + default: +- assert(sz != sz); ++ //assert(sz != sz); + abort(); + } + +@@ -414,7 +414,7 @@ value_extract_word(struct value *value, + *retp = (long)u.u64; + return 0; + default: +- assert(sz != sz); ++ //assert(sz != sz); + abort(); + } + } +Only in ltrace-0.7.91.dj/: value.c~ diff --git a/ltrace-0.7.91-unwind-elfutils.patch b/ltrace-0.7.91-unwind-elfutils.patch index 6a855a8..3b46a76 100644 --- a/ltrace-0.7.91-unwind-elfutils.patch +++ b/ltrace-0.7.91-unwind-elfutils.patch @@ -379,24 +379,6 @@ diff -u ltrace-0.7.91/proc.c ltrace-0.7.91-pm/proc.c struct library_symbol *libsym = NULL; while ((libsym = library_each_symbol(lib, libsym, diff -u ltrace-0.7.91/proc.c.orig ltrace-0.7.91-pm/proc.c.orig ---- ltrace-0.7.91/proc.c.orig 2013-10-23 01:01:15.000000000 +0200 -+++ ltrace-0.7.91-pm/proc.c.orig 2015-01-09 00:37:24.120218624 +0100 -@@ -220,9 +220,11 @@ - goto fail; - } - -- if (proc->leader != proc) -- return 0; -- if (process_init_main(proc) < 0) { -+ if (proc->leader != proc) { -+ proc->e_machine = proc->leader->e_machine; -+ proc->e_class = proc->leader->e_class; -+ get_arch_dep(proc); -+ } else if (process_init_main(proc) < 0) { - process_bare_destroy(proc, 0); - goto fail; - } -diff -u ltrace-0.7.91/proc.h ltrace-0.7.91-pm/proc.h --- ltrace-0.7.91/proc.h 2015-01-09 00:38:17.966190936 +0100 +++ ltrace-0.7.91-pm/proc.h 2015-01-09 00:37:40.261910548 +0100 @@ -28,6 +28,10 @@ diff --git a/ltrace.spec b/ltrace.spec index 7b9826e..713b375 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 19%{?dist} +Release: 20%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -97,6 +97,9 @@ Patch24: ltrace-0.7.91-ppc64le-configure.patch Patch25: ltrace-rh1307754.patch +# GCC now warns (errors) on "tautological compares", and readdir_r is deprecated. +Patch26: ltrace-0.7.91-tautology.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -134,6 +137,7 @@ execution of processes. %patch23 -p1 %patch24 -p1 %patch25 -p1 +%patch26 -p1 %build autoreconf -i @@ -159,7 +163,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog -* Thu Feb 19 2016 Jeff Law - 0.7.91-19 +* Wed Jul 20 2016 DJ Delorie - 0.7.91-20 +- Fix FTBFS due to new gcc 6 warnings, deprecated readdir_r, and bogus chunk in unwind-elf patch. + +* Fri Feb 19 2016 Jeff Law - 0.7.91-19 - Fix FTBFS due to testsuite failure (#1307754) . Add missing files to %doc * Thu Feb 04 2016 Fedora Release Engineering - 0.7.91-18 From f12c53f19760bb0afd75b7b27029c2b36dba34d2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 20:04:05 +0000 Subject: [PATCH 031/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 713b375..212b881 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 20%{?dist} +Release: 21%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -163,6 +163,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 0.7.91-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Wed Jul 20 2016 DJ Delorie - 0.7.91-20 - Fix FTBFS due to new gcc 6 warnings, deprecated readdir_r, and bogus chunk in unwind-elf patch. From 45c459ecca16a30bf1749fa5dbadedfdb94d0949 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 17 Feb 2017 10:08:32 -0700 Subject: [PATCH 032/100] +- Fix FTBFS due to invalid code in ARM support (#1423913). --- ltrace-rh1423913.patch | 20 ++++++++++++++++++++ ltrace.spec | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ltrace-rh1423913.patch diff --git a/ltrace-rh1423913.patch b/ltrace-rh1423913.patch new file mode 100644 index 0000000..f328dd9 --- /dev/null +++ b/ltrace-rh1423913.patch @@ -0,0 +1,20 @@ +diff -Nrup a/sysdeps/linux-gnu/arm/trace.c b/sysdeps/linux-gnu/arm/trace.c +--- a/sysdeps/linux-gnu/arm/trace.c 2013-03-11 17:23:39.000000000 -0600 ++++ b/sysdeps/linux-gnu/arm/trace.c 2017-02-17 09:39:42.233547101 -0700 +@@ -155,6 +155,8 @@ arm_get_next_pcs(struct process *proc, + const unsigned cond = BITS(this_instr, 28, 31); + const unsigned opcode = BITS(this_instr, 24, 27); + ++ uint32_t operand1, operand2, result = 0; ++ + if (cond == COND_NV) + switch (opcode) { + arch_addr_t addr; +@@ -170,7 +172,6 @@ arm_get_next_pcs(struct process *proc, + } + else + switch (opcode) { +- uint32_t operand1, operand2, result = 0; + case 0x0: + case 0x1: /* data processing */ + case 0x2: diff --git a/ltrace.spec b/ltrace.spec index 212b881..836617a 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 21%{?dist} +Release: 22%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -100,6 +100,9 @@ Patch25: ltrace-rh1307754.patch # GCC now warns (errors) on "tautological compares", and readdir_r is deprecated. Patch26: ltrace-0.7.91-tautology.patch +# ARM code has unreachable code after switch statement, move initialization +Patch27: ltrace-rh1423913.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -138,6 +141,7 @@ execution of processes. %patch24 -p1 %patch25 -p1 %patch26 -p1 +%patch27 -p1 %build autoreconf -i @@ -163,6 +167,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Feb 17 2017 Jeff Law - 0.7.91-22 +- Fix FTBFS due to invalid code in ARM support (#1423913). + * Fri Feb 10 2017 Fedora Release Engineering - 0.7.91-21 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 4e917b570b0393cb408ca1d7bf1a3fc53dd3e441 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 20:24:27 +0000 Subject: [PATCH 033/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 836617a..54a422e 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 22%{?dist} +Release: 23%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -167,6 +167,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 0.7.91-23 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 17 2017 Jeff Law - 0.7.91-22 - Fix FTBFS due to invalid code in ARM support (#1423913). From cf9d69d54c01f58487c9b8847011521d81b12d1e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 3 Aug 2017 02:47:24 +0000 Subject: [PATCH 034/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 54a422e..b8b9150 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 23%{?dist} +Release: 24%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -167,6 +167,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Aug 03 2017 Fedora Release Engineering - 0.7.91-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 0.7.91-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 03c55be2aedeab88b2c26009f412a4320a3c8eaf Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 8 Feb 2018 00:17:17 +0000 Subject: [PATCH 035/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index b8b9150..e4df482 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 24%{?dist} +Release: 25%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -167,6 +167,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Feb 08 2018 Fedora Release Engineering - 0.7.91-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + * Thu Aug 03 2017 Fedora Release Engineering - 0.7.91-24 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild From b6a19f98564b1c964c153b555b2edafa07b80f85 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Fri, 9 Feb 2018 09:05:05 +0100 Subject: [PATCH 036/100] Escape macros in %changelog Reference: https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/thread/Y2ZUKK2B7T2IKXPMODNF6HB2O5T5TS6H/ Signed-off-by: Igor Gnatenko --- ltrace.spec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ltrace.spec b/ltrace.spec index e4df482..4314676 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 25%{?dist} +Release: 26%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -167,6 +167,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Feb 09 2018 Igor Gnatenko - 0.7.91-26 +- Escape macros in %%changelog + * Thu Feb 08 2018 Fedora Release Engineering - 0.7.91-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild @@ -186,7 +189,7 @@ echo ====================TESTING END===================== - Fix FTBFS due to new gcc 6 warnings, deprecated readdir_r, and bogus chunk in unwind-elf patch. * Fri Feb 19 2016 Jeff Law - 0.7.91-19 -- Fix FTBFS due to testsuite failure (#1307754) . Add missing files to %doc +- Fix FTBFS due to testsuite failure (#1307754) . Add missing files to %%doc * Thu Feb 04 2016 Fedora Release Engineering - 0.7.91-18 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild From 22553ad6c53dfe12d86ee61f15e61d9451e9dcd1 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Fri, 6 Jul 2018 14:54:28 -0400 Subject: [PATCH 037/100] Fix AARCH64 params - Fix aarch64 long parameters (via $r8) support. - Make system_call_params test compare more exactly. --- ltrace-0.7.91-aarch64-params.patch | 37 ++++++++++++++++++++++++++++++ ltrace.spec | 10 +++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-aarch64-params.patch diff --git a/ltrace-0.7.91-aarch64-params.patch b/ltrace-0.7.91-aarch64-params.patch new file mode 100644 index 0000000..29767c5 --- /dev/null +++ b/ltrace-0.7.91-aarch64-params.patch @@ -0,0 +1,37 @@ +diff -rup a/sysdeps/linux-gnu/aarch64/fetch.c b/sysdeps/linux-gnu/aarch64/fetch.c +--- a/sysdeps/linux-gnu/aarch64/fetch.c 2018-07-05 16:06:10.066626252 -0400 ++++ b/sysdeps/linux-gnu/aarch64/fetch.c 2018-07-05 16:17:17.659748481 -0400 +@@ -308,12 +308,9 @@ arch_fetch_arg_init(enum tof type, struc + struct fetch_script how = pass_arg(context, proc, ret_info); + if (how.c == CVT_ERR) + goto fail; +- if (how.c == CVT_NOP && how.f == FETCH_STACK) { ++ if (how.c == CVT_BYREF && how.f == FETCH_GPR) { + /* XXX double cast. */ + context->x8 = (arch_addr_t) (uintptr_t) context->gregs.regs[8]; +- /* See the comment above about the assert. */ +- assert(! "Unexpected: first argument passed on stack."); +- abort(); + } + + return context; +diff -rup a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp +--- a/testsuite/ltrace.main/system_call_params.exp 2018-07-05 16:06:10.516624926 -0400 ++++ b/testsuite/ltrace.main/system_call_params.exp 2018-07-05 16:58:01.549830643 -0400 +@@ -61,13 +61,13 @@ set conf [ltraceNamedSource "$dir/syscal + # doesn't list readdir, that would be taken from somelib.conf with a + # wrong prototype. + +-ltraceMatch1 [ltraceRun -L -S -F $conf -- $bin] {^open@SYS\("/some/path"} == 0 ++ltraceMatch1 [ltraceRun -L -S -F $conf -- $bin] {^open@SYS\("/some/path", 0\)} == 0 + + # On the other hand, if -F somedir/ is given, we want to accept + # syscalls.conf found there. + + ltraceMatch [ltraceRun -L -S -F $dir -- $bin] { +- {{^open@SYS\("/some/path"} == 1} ++ {{^open@SYS\("/some/path", 0\)} == 1} + {{^write@SYS\(1, "something", 10\)} == 1} + {{^mount@SYS\("source", "target", "filesystemtype"} == 1} + } +Only in b/testsuite/ltrace.main: system_call_params.exp~ diff --git a/ltrace.spec b/ltrace.spec index 4314676..0eab999 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 26%{?dist} +Release: 27%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -103,6 +103,9 @@ Patch26: ltrace-0.7.91-tautology.patch # ARM code has unreachable code after switch statement, move initialization Patch27: ltrace-rh1423913.patch +# AARCH64 large parameters and syscall testsuite fixes. +Patch28: ltrace-0.7.91-aarch64-params.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -142,6 +145,7 @@ execution of processes. %patch25 -p1 %patch26 -p1 %patch27 -p1 +%patch28 -p1 %build autoreconf -i @@ -167,6 +171,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jul 05 2018 DJ Delorie - 0.7.91-27 +- Fix aarch64 long parameters (via $r8) support. +- Make system_call_params test compare more exactly. + * Fri Feb 09 2018 Igor Gnatenko - 0.7.91-26 - Escape macros in %%changelog From d85198bfb5852ef6989145d15bb75a0cac174ca7 Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Tue, 10 Jul 2018 01:50:56 -0500 Subject: [PATCH 038/100] Remove needless use of %defattr --- ltrace.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 0eab999..dee6fe7 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -163,7 +163,6 @@ timeout 180 make check ||: echo ====================TESTING END===================== %files -%defattr(-,root,root) %doc NEWS COPYING CREDITS INSTALL README TODO %{_bindir}/ltrace %{_mandir}/man1/ltrace.1* From b29373d63612b8e95be436684ca79bbff2a0e7f5 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 13 Jul 2018 09:25:07 +0000 Subject: [PATCH 039/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index dee6fe7..4ea8190 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 27%{?dist} +Release: 28%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -170,6 +170,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Jul 13 2018 Fedora Release Engineering - 0.7.91-28 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + * Thu Jul 05 2018 DJ Delorie - 0.7.91-27 - Fix aarch64 long parameters (via $r8) support. - Make system_call_params test compare more exactly. From 6ec3ae320790f1313629ce4f19614ccbb9648c75 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 16 Jan 2019 15:06:46 -0700 Subject: [PATCH 040/100] - Avoid passing NULL as argument to %s in printf call --- ltrace-0.7.91-null.patch | 14 ++++++++++++++ ltrace.spec | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-null.patch diff --git a/ltrace-0.7.91-null.patch b/ltrace-0.7.91-null.patch new file mode 100644 index 0000000..4ff7e6a --- /dev/null +++ b/ltrace-0.7.91-null.patch @@ -0,0 +1,14 @@ +diff --git a/output.c b/output.c +index 7cab383..18f9cf0 100644 +--- a/output.c ++++ b/output.c +@@ -598,6 +598,9 @@ frame_callback (Dwfl_Frame *state, void *arg) + NULL, NULL, NULL); + symname = dwfl_module_addrinfo(mod, pc, &off, &sym, + NULL, NULL, NULL); ++ } else { ++ modname = "unknown"; ++ symname = "unknown"; + } + + /* This mimics the output produced by libunwind below. */ diff --git a/ltrace.spec b/ltrace.spec index 4ea8190..0528806 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 28%{?dist} +Release: 29%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ Group: Development/Debuggers @@ -106,6 +106,9 @@ Patch27: ltrace-rh1423913.patch # AARCH64 large parameters and syscall testsuite fixes. Patch28: ltrace-0.7.91-aarch64-params.patch +# gcc-9 fix. Avoid passing NULL as argument to %s +Patch29: ltrace-0.7.91-null.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -146,6 +149,7 @@ execution of processes. %patch26 -p1 %patch27 -p1 %patch28 -p1 +%patch29 -p1 %build autoreconf -i @@ -170,6 +174,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Jan 16 2019 Jeff Law - 0.7.91-29 +- Avoid passing NULL as argument to %s in printf call + * Fri Jul 13 2018 Fedora Release Engineering - 0.7.91-28 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild From 2aadca5477fde4d84740aa37f675cbc38a874aa4 Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Mon, 28 Jan 2019 20:17:53 +0100 Subject: [PATCH 041/100] Remove obsolete Group tag References: https://fedoraproject.org/wiki/Changes/Remove_Group_Tag --- ltrace.spec | 1 - 1 file changed, 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 0528806..99eaba8 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -4,7 +4,6 @@ Version: 0.7.91 Release: 29%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ -Group: Development/Debuggers BuildRequires: elfutils-devel dejagnu BuildRequires: libselinux-devel From 32b5bcdc8d06f32ad8b1a2a7706838eda588aa74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 1 Feb 2019 09:06:12 +0000 Subject: [PATCH 042/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 99eaba8..f2ff26e 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 29%{?dist} +Release: 30%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -173,6 +173,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Feb 01 2019 Fedora Release Engineering - 0.7.91-30 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + * Wed Jan 16 2019 Jeff Law - 0.7.91-29 - Avoid passing NULL as argument to %s in printf call From 5695a6a3e519e6f15ae9c975b97edb9912357c68 Mon Sep 17 00:00:00 2001 From: Eugene Syromiatnikov Date: Tue, 5 Mar 2019 17:50:28 -0500 Subject: [PATCH 043/100] Fix "Too many return value classes" assert Patch to ensure e_machine is properly initialized in some cases where we attach to a running multi-threaded process. --- ltrace-0.7.91-emachine-init.patch | 49 +++++++++++++++++++++++++++++++ ltrace.spec | 9 +++++- 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-emachine-init.patch diff --git a/ltrace-0.7.91-emachine-init.patch b/ltrace-0.7.91-emachine-init.patch new file mode 100644 index 0000000..7bcc765 --- /dev/null +++ b/ltrace-0.7.91-emachine-init.patch @@ -0,0 +1,49 @@ +Patch to ensure e_machine is properly initialized in some cases where +we attach to a running multi-threaded process. + +diff -rup a/proc.c b/proc.c +--- a/proc.c 2019-02-28 17:32:50.020734842 -0500 ++++ b/proc.c 2019-02-28 21:04:31.179942091 -0500 +@@ -38,6 +38,7 @@ + #include "breakpoint.h" + #include "debug.h" + #include "fetch.h" ++#include "ltrace-elf.h" + #include "options.h" + #include "proc.h" + #include "value_dict.h" +@@ -218,6 +219,21 @@ process_init(struct process *proc, const + return -1; + } + ++ { ++ struct ltelf lte; ++ ++ if (ltelf_init(<e, filename) < 0) { ++ process_bare_destroy(proc, 0); ++ goto fail; ++ } ++ ++ proc->e_machine = lte.ehdr.e_machine; ++ proc->e_class = lte.ehdr.e_ident[EI_CLASS]; ++ get_arch_dep(proc); ++ ++ ltelf_destroy(<e); ++ } ++ + if (os_process_init(proc) < 0) { + process_bare_destroy(proc, 0); + goto fail; +diff -rup a/sysdeps/linux-gnu/x86/fetch.c b/sysdeps/linux-gnu/x86/fetch.c +--- a/sysdeps/linux-gnu/x86/fetch.c 2019-02-28 17:32:50.168810377 -0500 ++++ b/sysdeps/linux-gnu/x86/fetch.c 2019-02-28 20:57:32.162800555 -0500 +@@ -275,6 +275,9 @@ allocate_integer(struct fetch_context *c + #undef HANDLE32 + } + ++ assert(!"Unknown machine architecture"); ++ abort(); ++ + case POOL_RETVAL: + switch (context->ireg) { + #ifdef __x86_64__ diff --git a/ltrace.spec b/ltrace.spec index f2ff26e..287e190 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 30%{?dist} +Release: 31%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -108,6 +108,9 @@ Patch28: ltrace-0.7.91-aarch64-params.patch # gcc-9 fix. Avoid passing NULL as argument to %s Patch29: ltrace-0.7.91-null.patch +# Fix "Too many return value classes" assert +Patch30: ltrace-0.7.91-emachine-init.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -149,6 +152,7 @@ execution of processes. %patch27 -p1 %patch28 -p1 %patch29 -p1 +%patch30 -p1 %build autoreconf -i @@ -173,6 +177,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Mar 5 2019 Eugene Syromiatnikov - 0.7.91-31 +- Fix "Too many return value classes" assert + * Fri Feb 01 2019 Fedora Release Engineering - 0.7.91-30 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild From 926a6be35eafc74b2db191227bc3c0779d533ef7 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 12 Mar 2019 20:34:42 -0400 Subject: [PATCH 044/100] Revert previous patch. Redundant. Not esyr's fault. --- ltrace-0.7.91-emachine-init.patch | 49 ------------------------------- ltrace.spec | 9 +++--- 2 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 ltrace-0.7.91-emachine-init.patch diff --git a/ltrace-0.7.91-emachine-init.patch b/ltrace-0.7.91-emachine-init.patch deleted file mode 100644 index 7bcc765..0000000 --- a/ltrace-0.7.91-emachine-init.patch +++ /dev/null @@ -1,49 +0,0 @@ -Patch to ensure e_machine is properly initialized in some cases where -we attach to a running multi-threaded process. - -diff -rup a/proc.c b/proc.c ---- a/proc.c 2019-02-28 17:32:50.020734842 -0500 -+++ b/proc.c 2019-02-28 21:04:31.179942091 -0500 -@@ -38,6 +38,7 @@ - #include "breakpoint.h" - #include "debug.h" - #include "fetch.h" -+#include "ltrace-elf.h" - #include "options.h" - #include "proc.h" - #include "value_dict.h" -@@ -218,6 +219,21 @@ process_init(struct process *proc, const - return -1; - } - -+ { -+ struct ltelf lte; -+ -+ if (ltelf_init(<e, filename) < 0) { -+ process_bare_destroy(proc, 0); -+ goto fail; -+ } -+ -+ proc->e_machine = lte.ehdr.e_machine; -+ proc->e_class = lte.ehdr.e_ident[EI_CLASS]; -+ get_arch_dep(proc); -+ -+ ltelf_destroy(<e); -+ } -+ - if (os_process_init(proc) < 0) { - process_bare_destroy(proc, 0); - goto fail; -diff -rup a/sysdeps/linux-gnu/x86/fetch.c b/sysdeps/linux-gnu/x86/fetch.c ---- a/sysdeps/linux-gnu/x86/fetch.c 2019-02-28 17:32:50.168810377 -0500 -+++ b/sysdeps/linux-gnu/x86/fetch.c 2019-02-28 20:57:32.162800555 -0500 -@@ -275,6 +275,9 @@ allocate_integer(struct fetch_context *c - #undef HANDLE32 - } - -+ assert(!"Unknown machine architecture"); -+ abort(); -+ - case POOL_RETVAL: - switch (context->ireg) { - #ifdef __x86_64__ diff --git a/ltrace.spec b/ltrace.spec index 287e190..6a8a34f 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 31%{?dist} +Release: 32%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -108,9 +108,6 @@ Patch28: ltrace-0.7.91-aarch64-params.patch # gcc-9 fix. Avoid passing NULL as argument to %s Patch29: ltrace-0.7.91-null.patch -# Fix "Too many return value classes" assert -Patch30: ltrace-0.7.91-emachine-init.patch - %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -152,7 +149,6 @@ execution of processes. %patch27 -p1 %patch28 -p1 %patch29 -p1 -%patch30 -p1 %build autoreconf -i @@ -177,6 +173,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Mar 12 2019 DJ Delorie - 0.7.91-32 +- Revert previous patch, redundant + * Tue Mar 5 2019 Eugene Syromiatnikov - 0.7.91-31 - Fix "Too many return value classes" assert From 33db0068ba692cd6fe66f7b46923b4e20734291b Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 4 Apr 2019 17:23:36 -0400 Subject: [PATCH 045/100] Add Intel CET support Adds two features: 1. Parsing CET-enabled PLTs. 2. Using a second "insecure" PLT as a fallback. --- ltrace-0.7.91-cet.patch | 121 ++++++++++++++++++++++++++++++++++++++++ ltrace.spec | 9 ++- 2 files changed, 129 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-cet.patch diff --git a/ltrace-0.7.91-cet.patch b/ltrace-0.7.91-cet.patch new file mode 100644 index 0000000..a320682 --- /dev/null +++ b/ltrace-0.7.91-cet.patch @@ -0,0 +1,121 @@ +diff -rup a/ltrace-elf.c b/ltrace-elf.c +--- a/ltrace-elf.c 2019-02-28 17:32:49.873659818 -0500 ++++ b/ltrace-elf.c 2019-02-28 17:36:32.426779439 -0500 +@@ -639,7 +639,21 @@ ltelf_read_elf(struct ltelf *lte, const + } + } else if (shdr.sh_type == SHT_PROGBITS + || shdr.sh_type == SHT_NOBITS) { +- if (strcmp(name, ".plt") == 0) { ++ if (strcmp(name, ".plt") == 0 ++ && lte->second_plt_seen == 0) { ++ lte->plt_addr = shdr.sh_addr; ++ lte->plt_size = shdr.sh_size; ++ lte->plt_data = elf_loaddata(scn, &shdr); ++ if (lte->plt_data == NULL) ++ fprintf(stderr, ++ "Can't load .plt data\n"); ++ lte->plt_flags = shdr.sh_flags; ++ } ++ /* An Intel CET binary has two PLTs; the ++ initial PLTGOT points to the second ++ one. */ ++ else if (strcmp(name, ".plt.sec") == 0) { ++ lte->second_plt_seen = 1; + lte->plt_addr = shdr.sh_addr; + lte->plt_size = shdr.sh_size; + lte->plt_data = elf_loaddata(scn, &shdr); +diff -rup a/ltrace-elf.h b/ltrace-elf.h +--- a/ltrace-elf.h 2019-02-28 17:32:49.874660328 -0500 ++++ b/ltrace-elf.h 2019-02-28 17:36:32.428779868 -0500 +@@ -45,6 +45,7 @@ struct ltelf { + Elf_Data *dynsym; + size_t dynsym_count; + const char *dynstr; ++ int second_plt_seen; + GElf_Addr plt_addr; + GElf_Word plt_flags; + size_t plt_size; +diff -rup a/sysdeps/linux-gnu/x86/plt.c b/sysdeps/linux-gnu/x86/plt.c +--- a/sysdeps/linux-gnu/x86/plt.c 2019-02-28 17:32:49.991720041 -0500 ++++ b/sysdeps/linux-gnu/x86/plt.c 2019-02-28 17:36:32.429780083 -0500 +@@ -28,18 +28,18 @@ + #include "trace.h" + + static GElf_Addr +-x86_plt_offset(uint32_t i) ++x86_plt_offset(struct ltelf *lte, uint32_t i) + { + /* Skip the first PLT entry, which contains a stub to call the + * resolver. */ +- return (i + 1) * 16; ++ return (i + (lte->second_plt_seen ? 0 : 1)) * 16; + } + + GElf_Addr + arch_plt_sym_val(struct ltelf *lte, size_t ndx, GElf_Rela *rela) + { + uint32_t i = *VECT_ELEMENT(<e->arch.plt_map, uint32_t, ndx); +- return x86_plt_offset(i) + lte->plt_addr; ++ return x86_plt_offset(lte, i) + lte->plt_addr; + } + + void * +@@ -116,6 +116,13 @@ arch_elf_init(struct ltelf *lte, struct + * 400426: 68 00 00 00 00 pushq $0x0 + * 40042b: e9 e0 ff ff ff jmpq 400410 <_init+0x18> + * ++ * For CET binaries it is the following: ++ * ++ * 13d0: f3 0f 1e fa endbr64 ++ * 13d4: 68 27 00 00 00 pushq $0x27 <-- index ++ * 13d9: f2 e9 71 fd ff ff bnd jmpq 1150 <.plt> ++ * 13df: 90 nop ++ * + * On i386, the argument to push is an offset of relocation to + * use. The first PLT slot has an offset of 0x0, the second + * 0x8, etc. On x86_64, it's directly the index that we are +@@ -128,11 +135,33 @@ arch_elf_init(struct ltelf *lte, struct + unsigned int i, sz = vect_size(<e->plt_relocs); + for (i = 0; i < sz; ++i) { + +- GElf_Addr offset = x86_plt_offset(i); ++ GElf_Addr offset = x86_plt_offset(lte, i); ++ uint32_t reloc_arg; + + uint8_t byte; +- if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 +- || byte != 0xff ++ if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0) ++ continue; ++ ++ ++ if (byte == 0xf3 ++ && elf_read_next_u8(lte->plt_data, &offset, &byte) >= 0 ++ && byte == 0x0f ++ && elf_read_next_u8(lte->plt_data, &offset, &byte) >= 0 ++ && byte == 0x1e ++ && elf_read_next_u8(lte->plt_data, &offset, &byte) >= 0 ++ && byte == 0xfa ++ && elf_read_next_u8(lte->plt_data, &offset, &byte) >= 0 ++ && byte == 0x68 ++ && elf_read_next_u32(lte->plt_data, ++ &offset, &reloc_arg) >= 0) ++ { ++ /* CET */ ++ fprintf(stderr, "%d: reloc_arg is %lx\n", i, (long)reloc_arg); ++ *VECT_ELEMENT(<e->arch.plt_map, unsigned int, reloc_arg) = i; ++ continue; ++ } ++ ++ if (byte != 0xff + || elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 + || (byte != 0xa3 && byte != 0x25)) + continue; +@@ -140,7 +169,6 @@ arch_elf_init(struct ltelf *lte, struct + /* Skip immediate argument in the instruction. */ + offset += 4; + +- uint32_t reloc_arg; + if (elf_read_next_u8(lte->plt_data, &offset, &byte) < 0 + || byte != 0x68 + || elf_read_next_u32(lte->plt_data, diff --git a/ltrace.spec b/ltrace.spec index 6a8a34f..1c231f8 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 32%{?dist} +Release: 33%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -108,6 +108,9 @@ Patch28: ltrace-0.7.91-aarch64-params.patch # gcc-9 fix. Avoid passing NULL as argument to %s Patch29: ltrace-0.7.91-null.patch +# Adds support for CET PLTs via second-plt lookups. +Patch30: ltrace-0.7.91-cet.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -149,6 +152,7 @@ execution of processes. %patch27 -p1 %patch28 -p1 %patch29 -p1 +%patch30 -p1 %build autoreconf -i @@ -173,6 +177,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Apr 4 2019 DJ Delorie - 0.7.91-33 +- Add Intel CET support. + * Tue Mar 12 2019 DJ Delorie - 0.7.91-32 - Revert previous patch, redundant From 3306a47dce13f5e5b5aa2f1d426f40fc29dc4d80 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Wed, 17 Jul 2019 16:06:34 -0400 Subject: [PATCH 046/100] Testsuite fixed, aarch64 updates - Add fixes in handling of bogus paths that come from XDG_CONFIG_DIRS. - Testsuite fixes for pre-installed config files. - Extra AARCH64 includes for gcc 9. - Testsuite: AARCH64 ifuncs not supported yet yet. --- ltrace-0.7.91-XDG_CONFIG_DIRS.patch | 151 ++++++++++++++++++ ltrace-0.7.91-aarch64-headers.patch | 24 +++ ...-0.7.91-testsuite-system_call_params.patch | 68 ++++++++ ltrace-rh1225568.patch | 12 ++ ltrace.spec | 24 ++- 5 files changed, 278 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-XDG_CONFIG_DIRS.patch create mode 100644 ltrace-0.7.91-aarch64-headers.patch create mode 100644 ltrace-0.7.91-testsuite-system_call_params.patch create mode 100644 ltrace-rh1225568.patch diff --git a/ltrace-0.7.91-XDG_CONFIG_DIRS.patch b/ltrace-0.7.91-XDG_CONFIG_DIRS.patch new file mode 100644 index 0000000..27638e6 --- /dev/null +++ b/ltrace-0.7.91-XDG_CONFIG_DIRS.patch @@ -0,0 +1,151 @@ +diff -rupN a/options.c b/options.c +--- a/options.c 2019-06-28 17:15:31.515626363 -0400 ++++ b/options.c 2019-06-28 17:18:59.490632337 -0400 +@@ -440,7 +440,8 @@ parse_int(const char *optarg, char opt, + } + + int +-parse_colon_separated_list(const char *paths, struct vect *vec) ++parse_colon_separated_list(const char *paths, struct vect *vec, ++ enum opt_F_origin origin) + { + /* PATHS contains a colon-separated list of directories and + * files to load. It's modeled after shell PATH variable, +@@ -467,6 +468,7 @@ parse_colon_separated_list(const char *p + struct opt_F_t arg = { + .pathname = tok, + .own_pathname = tok == clone, ++ .origin = origin, + }; + if (VECT_PUSHBACK(vec, &arg) < 0) + /* Presumably this is not a deal-breaker. */ +@@ -494,16 +496,18 @@ opt_F_get_kind(struct opt_F_t *entry) + if (entry->kind == OPT_F_UNKNOWN) { + struct stat st; + if (lstat(entry->pathname, &st) < 0) { +- fprintf(stderr, "Couldn't stat %s: %s\n", +- entry->pathname, strerror(errno)); ++ if (entry->origin == OPT_F_CMDLINE) ++ fprintf(stderr, "Couldn't stat %s: %s\n", ++ entry->pathname, strerror(errno)); + entry->kind = OPT_F_BROKEN; + } else if (S_ISDIR(st.st_mode)) { + entry->kind = OPT_F_DIR; + } else if (S_ISREG(st.st_mode) || S_ISLNK(st.st_mode)) { + entry->kind = OPT_F_FILE; + } else { +- fprintf(stderr, "%s is neither a regular file, " +- "nor a directory.\n", entry->pathname); ++ if (entry->origin == OPT_F_CMDLINE) ++ fprintf(stderr, "%s is neither a regular file, " ++ "nor a directory.\n", entry->pathname); + entry->kind = OPT_F_BROKEN; + } + } +@@ -607,7 +611,8 @@ process_options(int argc, char **argv) + options.follow = 1; + break; + case 'F': +- parse_colon_separated_list(optarg, &opt_F); ++ parse_colon_separated_list(optarg, &opt_F, ++ OPT_F_CMDLINE); + break; + case 'h': + usage(); +diff -rupN a/options.h b/options.h +--- a/options.h 2019-06-28 17:15:31.515626363 -0400 ++++ b/options.h 2019-06-28 17:18:55.984632238 -0400 +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012,2013 Petr Machata, Red Hat Inc. ++ * Copyright (C) 2012, 2013, 2015 Petr Machata, Red Hat Inc. + * Copyright (C) 2009,2010 Joe Damato + * Copyright (C) 1998,2002,2008 Juan Cespedes + * Copyright (C) 2006 Ian Wienand +@@ -77,10 +77,16 @@ enum opt_F_kind { + OPT_F_DIR, + }; + ++enum opt_F_origin { ++ OPT_F_CMDLINE = 0, ++ OPT_F_ENVIRON, ++}; ++ + struct opt_F_t { + char *pathname; + int own_pathname : 1; + enum opt_F_kind kind : 2; ++ enum opt_F_origin origin : 1; + }; + + /* If entry->kind is OPT_F_UNKNOWN, figure out whether it should be +@@ -98,7 +104,8 @@ void opt_F_destroy(struct opt_F_t *entry + * The list is split and added to VEC, which shall be a vector + * initialized like VECT_INIT(VEC, struct opt_F_t); Returns 0 on + * success or a negative value on failure. */ +-int parse_colon_separated_list(const char *paths, struct vect *vec); ++int parse_colon_separated_list(const char *paths, struct vect *vec, ++ enum opt_F_origin origin); + + /* Vector of struct opt_F_t. */ + extern struct vect opt_F; +diff -rupN a/sysdeps/linux-gnu/hooks.c b/sysdeps/linux-gnu/hooks.c +--- a/sysdeps/linux-gnu/hooks.c 2013-11-04 20:08:03.000000000 -0500 ++++ b/sysdeps/linux-gnu/hooks.c 2019-06-28 17:18:55.989632238 -0400 +@@ -1,6 +1,6 @@ + /* + * This file is part of ltrace. +- * Copyright (C) 2012, 2013 Petr Machata ++ * Copyright (C) 2012, 2013, 2015 Petr Machata + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as +@@ -153,7 +153,7 @@ again: + if (xdg_sys != NULL) { + struct vect v; + VECT_INIT(&v, struct opt_F_t); +- if (parse_colon_separated_list(xdg_sys, &v) < 0 ++ if (parse_colon_separated_list(xdg_sys, &v, OPT_F_ENVIRON) < 0 + || VECT_EACH(&v, struct opt_F_t, NULL, + add_dir_component_cb, &dirs) != NULL) + fprintf(stderr, +diff -rupN a/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp b/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp +--- a/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp 1969-12-31 19:00:00.000000000 -0500 ++++ b/testsuite/ltrace.main/XDG_CONFIG_DIRS.exp 2019-06-28 17:18:55.989632238 -0400 +@@ -0,0 +1,35 @@ ++# This file is part of ltrace. ++# Copyright (C) 2015 Petr Machata, Red Hat Inc. ++# ++# This program is free software; you can redistribute it and/or ++# modify it under the terms of the GNU General Public License as ++# published by the Free Software Foundation; either version 2 of the ++# License, or (at your option) any later version. ++# ++# This program is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License ++# along with this program; if not, write to the Free Software ++# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA ++# 02110-1301 USA ++ ++set bin [ltraceCompile {} [ltraceSource c { ++ int main() { return 0; } ++}]] ++ ++setenv XDG_CONFIG_DIRS "blah" ++ltraceRun -L -- $bin ++unsetenv XDG_CONFIG_DIRS ++ ++if {[catch "exec $LTRACE -L -F blah -- $bin" output]} { ++ ltraceMatch [ltraceSource ltrace "$output"] { ++ {blah == 1} ++ } ++} else { ++ fail "expected error message regarding `blah`" ++} ++ ++ltraceDone diff --git a/ltrace-0.7.91-aarch64-headers.patch b/ltrace-0.7.91-aarch64-headers.patch new file mode 100644 index 0000000..597fa0a --- /dev/null +++ b/ltrace-0.7.91-aarch64-headers.patch @@ -0,0 +1,24 @@ +Index: ltrace-0.7.91/sysdeps/linux-gnu/aarch64/regs.c +=================================================================== +--- ltrace-0.7.91.orig/sysdeps/linux-gnu/aarch64/regs.c ++++ ltrace-0.7.91/sysdeps/linux-gnu/aarch64/regs.c +@@ -23,6 +23,7 @@ + #include + #include + #include ++#include + + #include "backend.h" + #include "proc.h" +Index: ltrace-0.7.91/sysdeps/linux-gnu/aarch64/trace.c +=================================================================== +--- ltrace-0.7.91.orig/sysdeps/linux-gnu/aarch64/trace.c ++++ ltrace-0.7.91/sysdeps/linux-gnu/aarch64/trace.c +@@ -24,6 +24,7 @@ + #include + #include + #include ++#include + + #include "backend.h" + #include "proc.h" diff --git a/ltrace-0.7.91-testsuite-system_call_params.patch b/ltrace-0.7.91-testsuite-system_call_params.patch new file mode 100644 index 0000000..233b5c8 --- /dev/null +++ b/ltrace-0.7.91-testsuite-system_call_params.patch @@ -0,0 +1,68 @@ +diff -rup a/testsuite/Makefile.am b/testsuite/Makefile.am +--- a/testsuite/Makefile.am 2012-12-16 20:53:45.000000000 -0500 ++++ b/testsuite/Makefile.am 2019-06-28 16:59:19.935602953 -0400 +@@ -39,6 +39,7 @@ env.exp: Makefile + rm -f env.exp + echo set libelf_LD_LIBRARY_PATH '"$(libelf_LD_LIBRARY_PATH)"' >> $@ + echo set libunwind_LD_LIBRARY_PATH '"$(libunwind_LD_LIBRARY_PATH)"' >> $@ ++ echo set PREFIX '"$(prefix)"' >> $@ + + CLEANFILES = *.o *.so *.log *.sum *.ltrace site.bak setval.tmp site.exp env.exp + +diff -rup a/testsuite/Makefile.in b/testsuite/Makefile.in +--- a/testsuite/Makefile.in 2013-11-04 20:22:47.000000000 -0500 ++++ b/testsuite/Makefile.in 2019-06-28 16:59:12.075602806 -0400 +@@ -648,6 +648,7 @@ env.exp: Makefile + rm -f env.exp + echo set libelf_LD_LIBRARY_PATH '"$(libelf_LD_LIBRARY_PATH)"' >> $@ + echo set libunwind_LD_LIBRARY_PATH '"$(libunwind_LD_LIBRARY_PATH)"' >> $@ ++ echo set PREFIX '"$(prefix)"' >> $@ + + # Tell versions [3.59,3.63) of GNU make to not export all variables. + # Otherwise a system limit (for SysV at least) may be exceeded. +diff -rup a/testsuite/ltrace.main/system_call_params.exp b/testsuite/ltrace.main/system_call_params.exp +--- a/testsuite/ltrace.main/system_call_params.exp 2019-06-28 16:44:07.542584754 -0400 ++++ b/testsuite/ltrace.main/system_call_params.exp 2019-06-28 17:00:35.811604355 -0400 +@@ -1,5 +1,5 @@ + # This file is part of ltrace. +-# Copyright (C) 2013, 2014 Petr Machata, Red Hat Inc. ++# Copyright (C) 2013, 2014, 2015 Petr Machata, Red Hat Inc. + # + # This program is free software; you can redistribute it and/or + # modify it under the terms of the GNU General Public License as +@@ -60,8 +60,35 @@ set conf [ltraceNamedSource "$dir/syscal + # somelib.conf is passed, and syscalls.conf is not available, or + # doesn't list readdir, that would be taken from somelib.conf with a + # wrong prototype. ++# ++# This test relies on the fact that there is no global config file ++# that would provide legitimate system call prototypes. But that ++# doesn't have to be true, maybe ltrace is already installed on the ++# system with the right prefix. So first compile a wrapper that we ++# use to redirect fopen calls. ++ ++set libfopen_so [ltraceCompile libfopen.so -ldl \ ++ [ltraceSource c [string map [list "@PREFIX@" "$PREFIX"] { ++ #define _GNU_SOURCE ++ #include ++ #include ++ #include ++ ++ FILE * ++ fopen(const char *path, const char *mode) ++ { ++ #define PATH "@PREFIX@/share" ++ if (strncmp(path, PATH, sizeof(PATH) - 1) == 0) ++ path = "/dev/null"; + ++ return ((FILE *(*)(const char *, const char *)) ++ dlsym(RTLD_NEXT, "fopen")) (path, mode); ++ } ++}]]] ++ ++setenv LD_PRELOAD $libfopen_so + ltraceMatch1 [ltraceRun -L -S -F $conf -- $bin] {^open@SYS\("/some/path", 0\)} == 0 ++unsetenv LD_PRELOAD + + # On the other hand, if -F somedir/ is given, we want to accept + # syscalls.conf found there. diff --git a/ltrace-rh1225568.patch b/ltrace-rh1225568.patch new file mode 100644 index 0000000..612abc1 --- /dev/null +++ b/ltrace-rh1225568.patch @@ -0,0 +1,12 @@ +diff -Nrup a/testsuite/ltrace.minor/trace-irelative.exp b/testsuite/ltrace.minor/trace-irelative.exp +--- a/testsuite/ltrace.minor/trace-irelative.exp 2013-11-04 18:08:03.000000000 -0700 ++++ b/testsuite/ltrace.minor/trace-irelative.exp 2015-06-01 12:30:59.737371166 -0600 +@@ -54,6 +54,8 @@ set src [ltraceSource c { + }] + + foreach ext {{} .pie} { ++ # ltrace does not yet support AARCH64's ifuncs ++ setup_xfail aarch64*-*-* + set bin1 [ltraceCompile $ext $src] + do_tests $bin1 "" + } diff --git a/ltrace.spec b/ltrace.spec index 1c231f8..85b2069 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,13 +1,14 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 33%{?dist} +Release: 34%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ BuildRequires: elfutils-devel dejagnu BuildRequires: libselinux-devel BuildRequires: autoconf automake libtool +BuildRequires: gcc-c++ # Note: this URL needs to be updated for each release, as the file # number changes for each file. Full list of released files is at: @@ -111,6 +112,17 @@ Patch29: ltrace-0.7.91-null.patch # Adds support for CET PLTs via second-plt lookups. Patch30: ltrace-0.7.91-cet.patch +# Extra #includes for gcc 9 +Patch31: ltrace-0.7.91-aarch64-headers.patch +# Testsuite: AARCH64 ifuncs not supported yet yet. +Patch32: ltrace-rh1225568.patch + +# testsuite fixes for pre-installed config files +Patch33: ltrace-0.7.91-testsuite-system_call_params.patch + +# Ignore bogus files from the environment +Patch34: ltrace-0.7.91-XDG_CONFIG_DIRS.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -153,6 +165,10 @@ execution of processes. %patch28 -p1 %patch29 -p1 %patch30 -p1 +%patch31 -p1 +%patch32 -p1 +%patch33 -p1 +%patch34 -p1 %build autoreconf -i @@ -177,6 +193,12 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Jul 17 2019 DJ Delorie - 0.7.91-34 +- Add fixes in handling of bogus paths that come from XDG_CONFIG_DIRS. +- Testsuite fixes for pre-installed config files. +- Extra AARCH64 includes for gcc 9. +- Testsuite: AARCH64 ifuncs not supported yet yet. + * Thu Apr 4 2019 DJ Delorie - 0.7.91-33 - Add Intel CET support. From 29bc5d8e70b416622c2c0c273d7ecca0ac5f6461 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 23 Jul 2019 14:35:04 -0400 Subject: [PATCH 047/100] Temporarily skip ppc64 tests Tests on ppc64le are hanging koji, despite the forced timeout. The rpmbuild finishes normally - even building rpms - but the hung testcase keeps koji from seeing it as "done". So skip tests on ppc64le for now, until we can fix the hang. --- ltrace.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 85b2069..325e0fd 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 34%{?dist} +Release: 35%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -182,7 +182,10 @@ make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} install # koji for some reason. Disable it, but have it handy. %check echo ====================TESTING========================= +# The ppc64 testsuite hangs rpmbuild hard in koji, disable until fixed. +%ifnarch ppc64le timeout 180 make check ||: +%endif echo ====================TESTING END===================== %files @@ -193,6 +196,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Jul 23 2019 DJ Delorie - 0.7.91-35 +- Skip ppc64 testsuite until the hangs in koji can be fixed. + * Wed Jul 17 2019 DJ Delorie - 0.7.91-34 - Add fixes in handling of bogus paths that come from XDG_CONFIG_DIRS. - Testsuite fixes for pre-installed config files. From 26dcb3847a196cd42e7fe6867e98b936dc449b84 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 29 Jan 2020 11:23:18 +0000 Subject: [PATCH 048/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 325e0fd..b5ea596 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 35%{?dist} +Release: 36%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -196,6 +196,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Wed Jan 29 2020 Fedora Release Engineering - 0.7.91-36 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + * Tue Jul 23 2019 DJ Delorie - 0.7.91-35 - Skip ppc64 testsuite until the hangs in koji can be fixed. From d2581840384951145c9a8979df82390661e474d9 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 6 Feb 2020 16:07:42 -0500 Subject: [PATCH 049/100] Initialize some variables to avoid gcc warning GCC cannot follow the logic that determines if it's safe to free lrhs in expr.c. Initializing these variables to NULL silences this warning. Resolves: #1799619 --- ltrace-0.7.91-rh1799619.patch | 16 ++++++++++++++++ ltrace.spec | 9 ++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-rh1799619.patch diff --git a/ltrace-0.7.91-rh1799619.patch b/ltrace-0.7.91-rh1799619.patch new file mode 100644 index 0000000..ceef540 --- /dev/null +++ b/ltrace-0.7.91-rh1799619.patch @@ -0,0 +1,16 @@ +diff -rup a/expr.c b/expr.c +--- a/expr.c 2013-10-10 08:43:55.000000000 -0400 ++++ b/expr.c 2020-02-06 17:05:40.658679755 -0500 +@@ -189,10 +189,10 @@ int + expr_clone(struct expr_node *retp, const struct expr_node *node) + { + *retp = *node; ++ struct expr_node *nlhs; ++ struct expr_node *nrhs = NULL; + + switch (node->kind) { +- struct expr_node *nlhs; +- struct expr_node *nrhs; + + case EXPR_OP_ARGNO: + case EXPR_OP_SELF: diff --git a/ltrace.spec b/ltrace.spec index b5ea596..4b1dd35 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 36%{?dist} +Release: 37%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -123,6 +123,9 @@ Patch33: ltrace-0.7.91-testsuite-system_call_params.patch # Ignore bogus files from the environment Patch34: ltrace-0.7.91-XDG_CONFIG_DIRS.patch +# GCC erroneously warns about uninitialized values +Patch35: ltrace-0.7.91-rh1799619.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -169,6 +172,7 @@ execution of processes. %patch32 -p1 %patch33 -p1 %patch34 -p1 +%patch35 -p1 %build autoreconf -i @@ -196,6 +200,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Feb 6 2020 DJ Delorie - 0.7.91-37 +- Initialize some variables to avoid gcc warning (#1799619) + * Wed Jan 29 2020 Fedora Release Engineering - 0.7.91-36 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild From ddce3ea91b59ab1a2373a1b895723ad8936d019d Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 14 Jul 2020 20:47:11 +0000 Subject: [PATCH 050/100] Use make macros https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro --- ltrace.spec | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ltrace.spec b/ltrace.spec index 4b1dd35..8e593bc 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 37%{?dist} +Release: 38%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -177,10 +177,10 @@ execution of processes. %build autoreconf -i %configure --docdir=%{?_pkgdocdir}%{!?_pkgdocdir:%{_docdir}/%{name}-%{version}} -make %{?_smp_mflags} +%make_build %install -make DESTDIR=$RPM_BUILD_ROOT bindir=%{_bindir} install +%make_install bindir=%{_bindir} # The testsuite is useful for development in real world, but fails in # koji for some reason. Disable it, but have it handy. @@ -200,6 +200,10 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Jul 14 2020 Tom Stellard - 0.7.91-38 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + * Thu Feb 6 2020 DJ Delorie - 0.7.91-37 - Initialize some variables to avoid gcc warning (#1799619) From 7583740404d8c248d717605657d603b466b18a66 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 28 Jul 2020 06:22:42 +0000 Subject: [PATCH 051/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 8e593bc..7766f83 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 38%{?dist} +Release: 39%{?dist} URL: http://ltrace.alioth.debian.org/ License: GPLv2+ @@ -200,6 +200,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Jul 28 2020 Fedora Release Engineering - 0.7.91-39 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + * Tue Jul 14 2020 Tom Stellard - 0.7.91-38 - Use make macros - https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro From bf46c36d909e2189abfb049c4fb156d735452075 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 11 Dec 2020 17:24:04 -0500 Subject: [PATCH 052/100] Document official upstream. --- ltrace.spec | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 7766f83..da71b4f 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -2,7 +2,9 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 Release: 39%{?dist} -URL: http://ltrace.alioth.debian.org/ +# In coordination with Juan Céspedes, upstream is now officially on gitlab. +# We are going to being sending all of our Fedora patches upstream to gitlab. +URL: https://gitlab.com/cespedes/ltrace License: GPLv2+ BuildRequires: elfutils-devel dejagnu From a3bd583aeed4a542c5fb92c6b9a937aba39ed3b9 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Tue, 5 Jan 2021 03:29:12 +0000 Subject: [PATCH 053/100] Add BuildRequires: make https://fedoraproject.org/wiki/Changes/Remove_make_from_BuildRoot --- ltrace.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/ltrace.spec b/ltrace.spec index da71b4f..9c3489e 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -11,6 +11,7 @@ BuildRequires: elfutils-devel dejagnu BuildRequires: libselinux-devel BuildRequires: autoconf automake libtool BuildRequires: gcc-c++ +BuildRequires: make # Note: this URL needs to be updated for each release, as the file # number changes for each file. Full list of released files is at: From e84d51dcc075ffd61ba4c58866961d285deceaac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Mon, 18 Jan 2021 16:44:54 +0100 Subject: [PATCH 054/100] Introduce CI gating with a simple test --- .fmf/version | 1 + gating.yaml | 13 ++++ plans/ci.fmf | 6 ++ tests/README | 2 + tests/Sanity/broken-binary-handling/Makefile | 63 ++++++++++++++++++ tests/Sanity/broken-binary-handling/PURPOSE | 3 + .../broken-binary-handling/broken.bin.gz | Bin 0 -> 98095 bytes tests/Sanity/broken-binary-handling/main.fmf | 14 ++++ .../Sanity/broken-binary-handling/runtest.sh | 56 ++++++++++++++++ 9 files changed, 158 insertions(+) create mode 100644 .fmf/version create mode 100644 gating.yaml create mode 100644 plans/ci.fmf create mode 100644 tests/README create mode 100644 tests/Sanity/broken-binary-handling/Makefile create mode 100644 tests/Sanity/broken-binary-handling/PURPOSE create mode 100644 tests/Sanity/broken-binary-handling/broken.bin.gz create mode 100644 tests/Sanity/broken-binary-handling/main.fmf create mode 100755 tests/Sanity/broken-binary-handling/runtest.sh diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..4fab4ec --- /dev/null +++ b/gating.yaml @@ -0,0 +1,13 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: baseos-ci.brew-build.tier1.functional} diff --git a/plans/ci.fmf b/plans/ci.fmf new file mode 100644 index 0000000..1ad2c12 --- /dev/null +++ b/plans/ci.fmf @@ -0,0 +1,6 @@ +summary: CI Gating Plan +discover: + how: fmf + directory: tests +execute: + how: beakerlib diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..bf13c2b --- /dev/null +++ b/tests/README @@ -0,0 +1,2 @@ +The test's Makefiles are not used in Fedora CI infrastructure. But are kept here + for backward compatibility with traditional beakerlib test harness in RHEL. diff --git a/tests/Sanity/broken-binary-handling/Makefile b/tests/Sanity/broken-binary-handling/Makefile new file mode 100644 index 0000000..c7ef76f --- /dev/null +++ b/tests/Sanity/broken-binary-handling/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Sanity/broken-binary-handling +# Description: Try to trace broken binary by ltrace +# Author: Michal Nowak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Sanity/broken-binary-handling +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE broken.bin.gz + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Try to trace broken binary by ltrace" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace gzip" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: yes" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity/broken-binary-handling/PURPOSE b/tests/Sanity/broken-binary-handling/PURPOSE new file mode 100644 index 0000000..e6b9426 --- /dev/null +++ b/tests/Sanity/broken-binary-handling/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Sanity/broken-binary-handling +Description: Try to trace broken binary by ltrace +Author: Michal Nowak diff --git a/tests/Sanity/broken-binary-handling/broken.bin.gz b/tests/Sanity/broken-binary-handling/broken.bin.gz new file mode 100644 index 0000000000000000000000000000000000000000..4fd81171603fae16743f68760e91c584ceef601c GIT binary patch literal 98095 zcmXV#Ra6{G*KO&>J;4$rxVyW%y99^e?rx0*cXtTx?$C5dg1b8e2@Z{WbI1AqTQ6&j zdRR5*-j78Vhl0ZP;I9e?|IOXS!OEHSo1HUU-y6EGmdp)YJe?Epz@PCG3m?OWGJ3OG zBZHDTakR=A$&6E`V%v`z8X7p_61FN~BvK`ejEz5j{Mg0U-q(z5OYZ>1g2L#5h~4?> zV=~3*N@?#CXN4ZTPO}dWZ$+0kK_GSLe71=-!c*e;r@AB&bNn*cuG?)heA|4V7 z!{XlOOu3?5Fq_|T93Zv)!sSRtFG9^ofdXt|wMckp9oq`BHDrU${fYk2rwP}Yv=&s369gB+#!0?@^5jAZv^lq zm_y4cgx=~KXK%jnnv6R@EV5jKYXL>s!#k%AneWj*(e0PsNyD?;y1J2G-#6bWBi?0B zLR2JcF5YEM-VFweGvEK#uD!P|>E9P|u)~I7TvF@wT0i`H{*)&1a!5>CP!ZM%l(SSs z`L3;=%p%cC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V>^qi!%OudrY7NeBuO_=lW#de+$F%+Y%Pv<{^L z@gc7gdoIFG@jDoEg2zVtlV{|u;G}JQ+BW~|lTeV}MX=ka +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gzip +duration: 5m +extra-summary: /tools/ltrace/Sanity/broken-binary-handling +extra-task: /tools/ltrace/Sanity/broken-binary-handling diff --git a/tests/Sanity/broken-binary-handling/runtest.sh b/tests/Sanity/broken-binary-handling/runtest.sh new file mode 100755 index 0000000..6558c78 --- /dev/null +++ b/tests/Sanity/broken-binary-handling/runtest.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Sanity/broken-binary-handling +# Description: Try to trace broken binary by ltrace +# Author: Michal Nowak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + cp broken.bin.gz $TmpDir + rlRun "pushd $TmpDir" + gunzip broken.bin.gz + chmod +x broken.bin + rlPhaseEnd + + rlPhaseStartTest + rlRun "ltrace -f ./broken.bin > out 2>&1 " 1 "ltrace can't trace broken.bin" + OUT=`cat out` + rlLog "LOG: $OUT" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 5ec9ca7d89fb5ebb73112f7ffc37934096c149b1 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Tue, 26 Jan 2021 18:46:42 +0000 Subject: [PATCH 055/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 9c3489e..979ab79 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 39%{?dist} +Release: 40%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -203,6 +203,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Jan 26 2021 Fedora Release Engineering - 0.7.91-40 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + * Tue Jul 28 2020 Fedora Release Engineering - 0.7.91-39 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild From 7fad3fa72c174c7070ce990b38f1d3109f72ce22 Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Mon, 8 Feb 2021 15:12:55 -0500 Subject: [PATCH 056/100] Support ppc64le SCV syscall insn If the kernel supports it AND glibc supports it, the ppc64le syscalls may use the SCV variant instead of the SC variant. The registers we care about have the same use so little change is required. Reference: RHEL BZ 1922305 --- ltrace-0.7.91-ppc64le-scv.patch | 20 ++++++++++++++++++++ ltrace.spec | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-ppc64le-scv.patch diff --git a/ltrace-0.7.91-ppc64le-scv.patch b/ltrace-0.7.91-ppc64le-scv.patch new file mode 100644 index 0000000..2feec6d --- /dev/null +++ b/ltrace-0.7.91-ppc64le-scv.patch @@ -0,0 +1,20 @@ +diff -rup a/sysdeps/linux-gnu/ppc/trace.c b/sysdeps/linux-gnu/ppc/trace.c +--- a/sysdeps/linux-gnu/ppc/trace.c 2021-02-08 14:35:16.876494095 -0500 ++++ b/sysdeps/linux-gnu/ppc/trace.c 2021-02-08 15:05:59.468107311 -0500 +@@ -57,6 +57,7 @@ get_arch_dep(struct process *proc) + } + + #define SYSCALL_INSN 0x44000002 ++#define SYSCALL2_INSN 0x44000001 + + /* Returns 1 if syscall, 2 if sysret, 0 otherwise. */ + int +@@ -75,7 +76,7 @@ syscall_p(struct process *proc, int stat + 0); + #endif + +- if (insn == SYSCALL_INSN) { ++ if (insn == SYSCALL_INSN || insn == SYSCALL2_INSN) { + *sysnum = + (int)ptrace(PTRACE_PEEKUSER, proc->pid, + sizeof(long) * PT_R0, 0); diff --git a/ltrace.spec b/ltrace.spec index 979ab79..7602f71 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 40%{?dist} +Release: 41%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -129,6 +129,9 @@ Patch34: ltrace-0.7.91-XDG_CONFIG_DIRS.patch # GCC erroneously warns about uninitialized values Patch35: ltrace-0.7.91-rh1799619.patch +# Support for both SC and SCV sycall insns +Patch36: ltrace-0.7.91-ppc64le-scv.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -176,6 +179,7 @@ execution of processes. %patch33 -p1 %patch34 -p1 %patch35 -p1 +%patch36 -p1 %build autoreconf -i @@ -203,6 +207,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Mon Feb 8 2021 DJ Delorie - 0.7.91-41 +- Add support for SCV syscall insn for ppc64le + * Tue Jan 26 2021 Fedora Release Engineering - 0.7.91-40 - Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild From fa03fb9fb0ee83df003f32e655bb39163b167b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 057/100] Import RHEL's regression test for #1427140 --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 27 ++++++++ .../runtest.sh | 55 ++++++++++++++++ 4 files changed, 151 insertions(+) create mode 100644 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile create mode 100644 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE create mode 100644 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf create mode 100755 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile new file mode 100644 index 0000000..664b7c4 --- /dev/null +++ b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch +# Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) +# Author: Michal Kolar +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Michal Kolar " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 30m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace autoconf automake dejagnu elfutils-devel elfutils-libelf-devel libselinux-devel libtool scl-utils-build yum-utils" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1427140" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE new file mode 100644 index 0000000..321dfcd --- /dev/null +++ b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch +Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) +Author: Michal Kolar +Bug summary: ltrace: ltrace-0.7.91-unwind-elfutils.patch modifies backup file created by previous patch +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1427140 diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf new file mode 100644 index 0000000..e8f7554 --- /dev/null +++ b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf @@ -0,0 +1,27 @@ +summary: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) +description: | + Bug summary: ltrace: ltrace-0.7.91-unwind-elfutils.patch modifies backup file created by previous patch + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1427140 +contact: Michal Kolar +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- autoconf +- automake +- dejagnu +- elfutils-devel +- elfutils-libelf-devel +- libselinux-devel +- libtool +- scl-utils-build +- yum-utils +- koji +- rpm-build +duration: 30m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1427140 +extra-summary: /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch +extra-task: /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh new file mode 100755 index 0000000..4f7fecc --- /dev/null +++ b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch +# Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) +# Author: Michal Kolar +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2017 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +CMD='ltrace' +BIN=$(which --skip-alias $CMD) +PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}" +export $PACKAGE + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlRun "koji download-build --arch=src $(rpm -q $PACKAGE)" + rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm" + rlRun "dnf builddep -y SPECS/*.spec" + rlPhaseEnd + + rlPhaseStartTest + rlRun "rpmbuild -bp --define='_topdir $TmpDir' --define='_default_patch_flags -s --no-backup-if-mismatch' --quiet SPECS/*.spec" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From dc3264a1bc732e3ab96773d249cc8dcf77a77fe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 058/100] Import RHEL's regression test for #1360259 --- .../Makefile | 64 +++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 18 +++++ .../runtest.sh | 71 +++++++++++++++++++ 4 files changed, 158 insertions(+) create mode 100644 tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/Makefile create mode 100644 tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/PURPOSE create mode 100644 tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/main.fmf create mode 100755 tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/Makefile b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/Makefile new file mode 100644 index 0000000..66c0e2e --- /dev/null +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option +# Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option) +# Author: Edjunior Machado +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2018 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Edjunior Machado " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace dbus" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1360259" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/PURPOSE b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/PURPOSE new file mode 100644 index 0000000..1ff38ce --- /dev/null +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option +Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option) +Author: Edjunior Machado +Bug summary: ltrace crashes when run on certain processes with the -S option +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1360259 diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/main.fmf b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/main.fmf new file mode 100644 index 0000000..5be886c --- /dev/null +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/main.fmf @@ -0,0 +1,18 @@ +summary: Test for BZ#1360259 (ltrace crashes when run on certain processes with the + -S option) +description: | + Bug summary: ltrace crashes when run on certain processes with the -S option + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1360259 +contact: Edjunior Machado +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- dbus +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1360259 +extra-summary: /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option +extra-task: /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh new file mode 100755 index 0000000..1ae4c93 --- /dev/null +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option +# Description: Test for BZ#1360259 (ltrace crashes when run on certain processes with the -S option) +# Author: Edjunior Machado +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2018 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +CMD='ltrace' +BIN=$(which --skip-alias $CMD) +PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}" + +if rlIsRHEL 9 || rlIsFedora; then + PROC_NAME=dbus-broker + SERVICE_NAME=dbus-broker +elif rlIsRHEL 6; then + PROC_NAME=dbus-daemon + SERVICE_NAME=messagebus +else + PROC_NAME=dbus-daemon + SERVICE_NAME=dbus +fi + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "pgrep $PROC_NAME || service $SERVICE_NAME start" 0 "Checking/starting $SERVICE_NAME" + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "PID=$(pidof $PROC_NAME)" + # try to ltrace dbus-daemon. If there is a bug (BZ#1360259), it will crash + rlWatchdog "ltrace -S -p $PID > output.log 2>&1" 30 INT + rlAssertEquals "ltrace is expected to be terminated by watchdog" 1 "$?" + rlLog "output.log: $(cat output.log)" + rlAssertNotGrep "\(Assertion.*failed\|Segmentation fault\)" output.log + rlAssertEquals "$PROC_NAME is expected to be still running" $PID "$(pidof $PROC_NAME)" + rlFileSubmit output.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlRun "service $SERVICE_NAME status --no-pager || service $SERVICE_NAME start" 0 "Checking/starting $SERVICE_NAME" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From cd59e55c7a893340174a308384eb29e6eef8deec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 059/100] Import RHEL's regression test for #1053765 --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 3 + .../main.fmf | 14 ++++ .../runtest.sh | 59 +++++++++++++++++ 4 files changed, 140 insertions(+) create mode 100644 tests/Regression/bz1053765-invalid-command-assertion-failure/Makefile create mode 100644 tests/Regression/bz1053765-invalid-command-assertion-failure/PURPOSE create mode 100644 tests/Regression/bz1053765-invalid-command-assertion-failure/main.fmf create mode 100755 tests/Regression/bz1053765-invalid-command-assertion-failure/runtest.sh diff --git a/tests/Regression/bz1053765-invalid-command-assertion-failure/Makefile b/tests/Regression/bz1053765-invalid-command-assertion-failure/Makefile new file mode 100644 index 0000000..d6c30c0 --- /dev/null +++ b/tests/Regression/bz1053765-invalid-command-assertion-failure/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure +# Description: The test tries to ltrace a non-existing app, ltrace should handle that. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Michael Petlan " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: The test tries to ltrace a non-existing app, ltrace should handle that." >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1053765" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1053765-invalid-command-assertion-failure/PURPOSE b/tests/Regression/bz1053765-invalid-command-assertion-failure/PURPOSE new file mode 100644 index 0000000..9afbcc2 --- /dev/null +++ b/tests/Regression/bz1053765-invalid-command-assertion-failure/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure +Description: The test tries to ltrace a non-existing app, ltrace should handle that. +Author: Michael Petlan diff --git a/tests/Regression/bz1053765-invalid-command-assertion-failure/main.fmf b/tests/Regression/bz1053765-invalid-command-assertion-failure/main.fmf new file mode 100644 index 0000000..75b068c --- /dev/null +++ b/tests/Regression/bz1053765-invalid-command-assertion-failure/main.fmf @@ -0,0 +1,14 @@ +summary: The test tries to ltrace a non-existing app, ltrace should handle that. +description: '' +contact: Michael Petlan +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1053765 +extra-summary: /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure +extra-task: /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure diff --git a/tests/Regression/bz1053765-invalid-command-assertion-failure/runtest.sh b/tests/Regression/bz1053765-invalid-command-assertion-failure/runtest.sh new file mode 100755 index 0000000..1a18424 --- /dev/null +++ b/tests/Regression/bz1053765-invalid-command-assertion-failure/runtest.sh @@ -0,0 +1,59 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz1053765-invalid-command-assertion-failure +# Description: The test tries to ltrace a non-existing app, ltrace should handle that. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlPhaseEnd + + rlPhaseStartTest + rlRun "{ ltrace blahblahblah0123546213208412321 2> err.log > out.log; } 2> superr.log" 1 "Running ltrace with a non-existing binary." + rlAssertNotGrep "Aborted" superr.log + rlAssertNotGrep "destroy" err.log + rlAssertNotGrep "Assertion" err.log + rlAssertNotGrep "assertion" err.log + rlAssertNotGrep "relocs" err.log + rlAssertNotGrep "failed" err.log + echo "==== stderr ====" + cat err.log + echo "==== stdout ====" + cat out.log + echo "==== external stderr ====" + cat superr.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "rm err.log out.log superr.log" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 4d182004cfcceca8d5f55d3cc9fcf0d76eed21ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 060/100] Import RHEL's regression test for #1051221 --- .../Makefile | 64 ++++++++++++++++ .../PURPOSE | 3 + .../hello.c | 7 ++ .../main.fmf | 17 +++++ .../runtest.sh | 74 +++++++++++++++++++ 5 files changed, 165 insertions(+) create mode 100644 tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/Makefile create mode 100644 tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/PURPOSE create mode 100644 tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/hello.c create mode 100644 tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/main.fmf create mode 100755 tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/runtest.sh diff --git a/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/Makefile b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/Makefile new file mode 100644 index 0000000..eca6d5f --- /dev/null +++ b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64 +# Description: The test tries to workaround of a bz1051221 a little. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64 +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE hello.c + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Michael Petlan " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: The test tries to workaround of a bz1051221 a little." >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace prelink binutils gcc" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1051221" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/PURPOSE b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/PURPOSE new file mode 100644 index 0000000..94c033b --- /dev/null +++ b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64 +Description: The test tries to workaround of a bz1051221 a little. +Author: Michael Petlan diff --git a/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/hello.c b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/hello.c new file mode 100644 index 0000000..b3c185b --- /dev/null +++ b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/hello.c @@ -0,0 +1,7 @@ +#include +#include + +int main(void) +{ + puts("Hello world...\n"); +} diff --git a/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/main.fmf b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/main.fmf new file mode 100644 index 0000000..f91b6d4 --- /dev/null +++ b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/main.fmf @@ -0,0 +1,17 @@ +summary: The test tries to workaround of a bz1051221 a little. +description: '' +contact: Michael Petlan +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- prelink +- binutils +- gcc +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1051221 +extra-summary: /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64 +extra-task: /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64 diff --git a/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/runtest.sh b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/runtest.sh new file mode 100755 index 0000000..6caa6f8 --- /dev/null +++ b/tests/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64/runtest.sh @@ -0,0 +1,74 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz1051221-untraced-symbols-cause-sigsegv-ppc64 +# Description: The test tries to workaround of a bz1051221 a little. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2014 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="ltrace" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "cp hello.c $TmpDir/" + rlRun "pushd $TmpDir" + rlRun "gcc -o hello-raw hello.c" + rlRun "cp hello-raw hello-stripped" + rlRun "strip ./hello-stripped" + if rpm -q prelink; then + rlRun "cp hello-raw hello-prelinked" + rlRun "cp hello-raw hello-stripped-prelinked" + rlRun "cp hello-raw hello-prelinked-stripped" + rlRun "prelink ./hello-prelinked" + rlRun "strip ./hello-stripped-prelinked" + rlRun "prelink hello-stripped-prelinked" + rlRun "prelink hello-prelinked-stripped" + rlRun "strip hello-prelinked-stripped" + fi + rlPhaseEnd + + rlPhaseStartTest + for binary in hello-*; do + rlLog "==== TESTING $binary ====" + rlRun "{ ltrace -e __libc_start_main ./$binary 2> err_$binary.log > out_$binary.log; } 2> superr_$binary.log" + rlAssertNotGrep "Aborted" superr_$binary.log + rlAssertNotGrep "SIGSEGV" superr_$binary.log + rlAssertNotGrep "Segmentation fault" superr_$binary.log + rlAssertNotGrep "killed" err_$binary.log + rlAssertNotGrep "SIGSEGV" err_$binary.log + rlAssertNotGrep "Segmentation fault" err_$binary.log + rlLog "+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+" + done + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From b190a780c0cad4497189e4a7cffcc67f1c339a2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 061/100] Import RHEL's regression test for #890961 --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 5 ++ .../ksh_bug.ksh | 8 +++ .../main.fmf | 18 ++++++ .../runtest.sh | 58 +++++++++++++++++ 5 files changed, 153 insertions(+) create mode 100644 tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/Makefile create mode 100644 tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/PURPOSE create mode 100644 tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/ksh_bug.ksh create mode 100644 tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/main.fmf create mode 100755 tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/runtest.sh diff --git a/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/Makefile b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/Makefile new file mode 100644 index 0000000..5e95fda --- /dev/null +++ b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due +# Description: Test for BZ#890961 ([RHEL 5] ltrace crashes with memory corruption due) +# Author: Miroslav Franc +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE ksh_bug.ksh + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Miroslav Franc " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#890961 ([RHEL 5] ltrace crashes with memory corruption due)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace ksh ltrace-debuginfo" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 890961" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/PURPOSE b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/PURPOSE new file mode 100644 index 0000000..d1ca455 --- /dev/null +++ b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due +Description: Test for BZ#890961 ([RHEL 5] ltrace crashes with memory corruption due) +Author: Miroslav Franc +Bug summary: [RHEL 5] ltrace crashes with memory corruption due to double free() +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=890961 diff --git a/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/ksh_bug.ksh b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/ksh_bug.ksh new file mode 100644 index 0000000..09f2bf7 --- /dev/null +++ b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/ksh_bug.ksh @@ -0,0 +1,8 @@ +#!/usr/bin/env ksh +# from bugzilla https://bugzilla.redhat.com/show_bug.cgi?id=890961 + +echo "Before processing a subshell" + +NUMFILES=$(ls | wc -l) + +echo "After processing a subshell" diff --git a/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/main.fmf b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/main.fmf new file mode 100644 index 0000000..4e0962f --- /dev/null +++ b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/main.fmf @@ -0,0 +1,18 @@ +summary: Test for BZ#890961 ([RHEL 5] ltrace crashes with memory corruption due) +description: | + Bug summary: [RHEL 5] ltrace crashes with memory corruption due to double free() + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=890961 +contact: Miroslav Franc +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- ksh +- ltrace-debuginfo +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=890961 +extra-summary: /tools/ltrace/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due +extra-task: /tools/ltrace/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due diff --git a/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/runtest.sh b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/runtest.sh new file mode 100755 index 0000000..5cc8819 --- /dev/null +++ b/tests/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due/runtest.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz890961-RHEL-5-ltrace-crashes-with-memory-corruption-due +# Description: Test for BZ#890961 ([RHEL 5] ltrace crashes with memory corruption due) +# Author: Miroslav Franc +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm ksh + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "cp ksh_bug.ksh $TmpDir" + rlRun "pushd $TmpDir" + rlPhaseEnd + + for ((i=0; i<10; ++i)); do + rlPhaseStartTest "test... $i" + rlRun "LIBC_FATAL_STDERR_=1 ltrace -f -o ./ltrace.out ksh ./ksh_bug.ksh 2> log.err > log.out" + rlAssertNotGrep 'glibc detected' log.err + rlRun "[[ $(wc -l Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 062/100] Import RHEL's regression test for #868281 --- .../Makefile | 67 +++++++++++ .../PURPOSE | 5 + .../main.fmf | 23 ++++ .../runtest.sh | 113 ++++++++++++++++++ 4 files changed, 208 insertions(+) create mode 100644 tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile create mode 100644 tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/PURPOSE create mode 100644 tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf create mode 100755 tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile new file mode 100644 index 0000000..4f22633 --- /dev/null +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile @@ -0,0 +1,67 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries +# Description: Test for BZ#868281 (ltrace doesn't work on PIE binaries) +# Author: Miroslav Franc +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Miroslav Franc " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#868281 (ltrace doesn't work on PIE binaries)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace gcc" >> $(METADATA) + @echo "Requires: libgcc.i686 glibc-devel.i686" >> $(METADATA) # 32-bit + @echo "Requires: libgcc.ppc64 glibc-devel.ppc64" >> $(METADATA) # 32-bit + @echo "Requires: libgcc.s390 glibc-devel.s390" >> $(METADATA) # 32-bit + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 868281" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/PURPOSE b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/PURPOSE new file mode 100644 index 0000000..6f46d12 --- /dev/null +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries +Description: Test for BZ#868281 (ltrace doesn't work on PIE binaries) +Author: Miroslav Franc +Bug summary: ltrace doesn't work on PIE binaries +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=868281 diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf new file mode 100644 index 0000000..a78d993 --- /dev/null +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf @@ -0,0 +1,23 @@ +summary: Test for BZ#868281 (ltrace doesn't work on PIE binaries) +description: | + Bug summary: ltrace doesn't work on PIE binaries + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=868281 +contact: Miroslav Franc +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- libgcc.i686 +- glibc-devel.i686 +- libgcc.ppc64 +- glibc-devel.ppc64 +- libgcc.s390 +- glibc-devel.s390 +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=868281 +extra-summary: /tools/ltrace/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries +extra-task: /tools/ltrace/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh new file mode 100755 index 0000000..714dfc4 --- /dev/null +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh @@ -0,0 +1,113 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries +# Description: Test for BZ#868281 (ltrace doesn't work on PIE binaries) +# Author: Miroslav Franc +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +LTRACE_RPM=$(rpm -qf `which ltrace`) +GCC="${GCC:-$(which gcc)}" +GCC_RPM=$(rpm -qf $GCC) +BINUTILS_RPM=$(rpm -qf `which ld`) + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $LTRACE_RPM + rlAssertRpm $GCC_RPM + rlAssertRpm $BINUTILS_RPM + for arch in $(rlGetPrimaryArch) $(rlGetSecondaryArch); do + rlCheckRpm glibc.$arch + done + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + + if [ -d /usr/lib64 ]; then + ARCH=`uname -i` + if [[ $ARCH =~ s390.* ]]; then + if rlIsRHEL '>=8'; then + rlLogInfo "RHEL-8 and newer do not support s390x 31-bit compilation" + MBITS= + else + MBITS=31 + if [[ "$LTRACE_RPM" =~ devtoolset-(9|10) ]] ; then + rlLogInfo "devtoolset-(9|10)-gcc do not support s390, hence using base gcc" + rlRun "GCC=/usr/bin/gcc" + rlAssertRpm $(rpm -qf $GCC) + fi + fi + elif [[ $ARCH =~ ia64|aarch64|ppc64le ]]; then + rlLogInfo "$ARCH does not support 32-bit compilation" + MBITS= + else + MBITS=32 + fi + fi + + rlLogInfo "MBITS=$MBITS" + + rlRun "echo 'int main(){alarm(42);return 0;}'| $GCC -fPIE -pie -x c -o a-native.out -" + rlAssertExists a-native.out + + if [ -n "$MBITS" ]; then + rlRun "echo 'int main(){alarm(42);return 0;}'| $GCC -fPIE -pie -m$MBITS -x c -o a-$MBITS.out -" + rlAssertExists a-$MBITS.out + fi + rlPhaseEnd + + rlPhaseStartTest "Native binary testing" + rlRun "ltrace ./a-native.out > log 2>&1" + LIBC_START_MAIN=true + if [[ "$ARCH" = "x86_64" ]]; then + if rlIsRHEL '>=8' || rlIsFedora; then + rlLogInfo "x86_64: Since RHEL-8 __libc_start_main has been optimized into non-PLT call, no longer ltraced (bz#1654734)" + LIBC_START_MAIN=false + fi + fi + if $LIBC_START_MAIN; then + rlAssertGrep "__libc_start_main" log + fi + rlAssertGrep "alarm(42)" log + rlAssertGrep "exited (status 0)" log + rlLog "log file:\n$(cat log)" + rlPhaseEnd + + if [ -n "$MBITS" ]; then + rlPhaseStartTest "$MBITS bit binary testing" + rlRun "ltrace ./a-$MBITS.out > log-$MBITS 2>&1" + rlAssertGrep "__libc_start_main" log-$MBITS + rlAssertGrep "alarm(42)" log-$MBITS + rlAssertGrep "exited (status 0)" log-$MBITS + rlLog "log file:\n$(cat log-$MBITS)" + rlPhaseEnd + fi + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From f2f13e861b57fa85edfaa6041a221b581f406595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 063/100] Import RHEL's regression test for #797761 --- .../Makefile | 65 +++++++++++++++++ .../PURPOSE | 3 + .../main.fmf | 15 ++++ .../runtest.sh | 69 +++++++++++++++++++ 4 files changed, 152 insertions(+) create mode 100644 tests/Regression/bz797761-ltrace-c-ommits-execl-call/Makefile create mode 100644 tests/Regression/bz797761-ltrace-c-ommits-execl-call/PURPOSE create mode 100644 tests/Regression/bz797761-ltrace-c-ommits-execl-call/main.fmf create mode 100755 tests/Regression/bz797761-ltrace-c-ommits-execl-call/runtest.sh diff --git a/tests/Regression/bz797761-ltrace-c-ommits-execl-call/Makefile b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/Makefile new file mode 100644 index 0000000..e202e57 --- /dev/null +++ b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/Makefile @@ -0,0 +1,65 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call +# Description: The test tries to ltrace an app which uses execl calls. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Michael Petlan " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: The test tries to ltrace an app which uses execl calls." >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Requires: glibc-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 797761" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz797761-ltrace-c-ommits-execl-call/PURPOSE b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/PURPOSE new file mode 100644 index 0000000..c9adac9 --- /dev/null +++ b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call +Description: The test tries to ltrace an app which uses execl calls. +Author: Michael Petlan diff --git a/tests/Regression/bz797761-ltrace-c-ommits-execl-call/main.fmf b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/main.fmf new file mode 100644 index 0000000..2617dea --- /dev/null +++ b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/main.fmf @@ -0,0 +1,15 @@ +summary: The test tries to ltrace an app which uses execl calls. +description: '' +contact: Michael Petlan +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- glibc-devel +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=797761 +extra-summary: /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call +extra-task: /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call diff --git a/tests/Regression/bz797761-ltrace-c-ommits-execl-call/runtest.sh b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/runtest.sh new file mode 100755 index 0000000..6fffcb4 --- /dev/null +++ b/tests/Regression/bz797761-ltrace-c-ommits-execl-call/runtest.sh @@ -0,0 +1,69 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz797761-ltrace-c-ommits-execl-call +# Description: The test tries to ltrace an app which uses execl calls. +# Author: Michael Petlan +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="ltrace" + +create_reproducer() +{ +cat < reproducer.c +#include +#include +int main () +{ + execl("/bin/ls","ls",0); + return 0; +} +EOF +} + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + create_reproducer + rlRun "gcc -o reproducer reproducer.c" + rlPhaseEnd + + rlPhaseStartTest + # The main purpose of this section is to check if the file ltrace-c.log contains the 'exec' substring. + rlRun "ltrace ./reproducer 2>&1 >/dev/null | tee ltrace.log" + rlRun "ltrace -c ./reproducer 2>&1 >/dev/null | tee ltrace-c.log" + rlAssertGrep "exec" ltrace.log + rlAssertGrep "exec" ltrace-c.log + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From d7b87c04312d8d989e3213d6facd4f9d205bb850 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 064/100] Import RHEL's regression test for #754096 --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 16 +++++ .../runtest.sh | 52 +++++++++++++++ 4 files changed, 137 insertions(+) create mode 100644 tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile create mode 100644 tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE create mode 100644 tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf create mode 100755 tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile new file mode 100644 index 0000000..9960d98 --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +# Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +# Author: Miroslav Franc +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Miroslav Franc " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by)" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 2m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 754096" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE new file mode 100644 index 0000000..8953b3d --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +Author: Miroslav Franc +Bug summary: ltrace crashes on PowerPC if tracing is limited by `-e' to event not present in trace +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=754096 diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf new file mode 100644 index 0000000..3c01c00 --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/main.fmf @@ -0,0 +1,16 @@ +summary: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +description: | + Bug summary: ltrace crashes on PowerPC if tracing is limited by `-e' to event not present in trace + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=754096 +contact: Miroslav Franc +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +duration: 2m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=754096 +extra-summary: /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +extra-task: /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by diff --git a/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh new file mode 100755 index 0000000..d59239d --- /dev/null +++ b/tests/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by/runtest.sh @@ -0,0 +1,52 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz754096-ltrace-crashes-on-PowerPC-if-tracing-is-limited-by +# Description: Test for BZ#754096 (ltrace crashes on PowerPC if tracing is limited by) +# Author: Miroslav Franc +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2013 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + rlRun "ltrace -e puts /bin/true" + rlRun "ltrace -e sprintf /bin/true" + rlRun "ltrace -e puts -e gets /bin/true" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From ec8db7cf57c9ad64879cd8d6424c65b0d1f6e94d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:01 +0200 Subject: [PATCH 065/100] Import RHEL's regression test for #447404 --- .../Makefile | 60 ++++++++++ .../PURPOSE | 4 + .../main.fmf | 18 +++ .../runtest.sh | 103 ++++++++++++++++++ 4 files changed, 185 insertions(+) create mode 100644 tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile create mode 100644 tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/PURPOSE create mode 100644 tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/main.fmf create mode 100755 tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile new file mode 100644 index 0000000..4b68558 --- /dev/null +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile @@ -0,0 +1,60 @@ +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + + +TOPLEVEL_NAMESPACE=/tools +PACKAGE_NAME=ltrace +RELATIVE_PATH=Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file + +export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + + +$(METADATA): Makefile + @touch $(METADATA) + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: When executing ltrace command with both -o and -c option, the result of ltrace command is not output into file" >> $(METADATA) + @echo "Bug: 447404" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: $(PACKAGE_NAME) gcc" >> $(METADATA) + @echo "License: GPLv3+" >> $(METADATA) + + rhts-lint $(METADATA) + diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/PURPOSE b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/PURPOSE new file mode 100644 index 0000000..0cd29d1 --- /dev/null +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/PURPOSE @@ -0,0 +1,4 @@ +When executing ltrace command with both -o and -c option, +the result of ltrace command is not output into the file +which is specified by -o option. + diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/main.fmf b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/main.fmf new file mode 100644 index 0000000..6357723 --- /dev/null +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/main.fmf @@ -0,0 +1,18 @@ +summary: When executing ltrace command with both -o and -c option, the result of ltrace + command is not output into file +description: "When executing ltrace command with both -o and -c option, \nthe result\ + \ of ltrace command is not output into the file \nwhich is specified by -o option.\n\ + \n" +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=447404 +extra-summary: /tools/ltrace/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file +extra-task: /tools/ltrace/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh new file mode 100755 index 0000000..77fbfef --- /dev/null +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + +# source the test script helpers +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf --queryformat '%{name}' $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlShowRunningKernel + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest "ltrace with -o and -c options tracing testing binary" + rlRun "echo 'int main(){alarm(42);return 0;}'| gcc -x c -o test.bin -" + rlRun "ltrace -o ltrace-test.log -c ./test.bin" 0 "ltrace is crunching a testing binary" + rlRun -l "cat ltrace-test.log" + rlAssertGrep "alarm" ltrace-test.log + rlAssertGreater "There has to be something in output file" $(cat ltrace-test.log | wc -l) 5 + rlPhaseEnd + + rlPhaseStartTest "ltrace with -o and -c options tracing system binary" + rlRun "ltrace -o ltrace-test-sys.log -c ls" 0 "ltrace is crunching ls" + rlRun -l "cat ltrace-test-sys.log" + if rlIsRHEL 8; then + case "$PACKAGE" in + "ltrace") + # bz#1655368 was fixed on ltrace-0.7.91-28.el8.x86_64, but it is still reproducible on ppc64le + if [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL8 ltrace fails to trace system binaries on ppc64le due to bz#1618748/bz#1655368, hence skipping failure checking" + skip_system_binary_test=1 + fi + ;; + "gcc-toolset-9-ltrace" | "gcc-toolset-10-ltrace") + if [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL8 gcc-toolset-9-ltrace/gcc-toolset-10-ltrace fails to trace system binaries on ppc64le due to bz#1731119, hence skipping failure checking" + skip_system_binary_test=1 + fi + ;; + esac + elif rlIsRHEL 9 && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL-9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking" + skip_system_binary_test=1 + elif rlIsFedora 33 && [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "FC33 ltrace fails to trace system binaries on ppc64le due to bz#1902770, hence skipping failure checking" + skip_system_binary_test=1 + fi + + # ltrace no longer reports __libc_start_main on rhel-8 x86_64 (rhbz#1654734) + if grep "ioctl" ltrace-test-sys.log; then + if [ $skip_system_binary_test ]; then + rlLogWarning "Test was skipped but it seems ok. Review skip check." + fi + else + if [ $skip_system_binary_test ]; then + rlLogInfo "ltrace output does not contain ioctl calls (expected failure)" + else + rlFail "ltrace output does not contain ioctl calls" + fi + fi + + rlRun "n_lines=$(grep -c . ltrace-test-sys.log)" + if [ $n_lines -gt 10 ]; then + if [ $skip_system_binary_test ]; then + rlLogWarning "Test was skipped but it seems ok. Review skip check." + fi + else + if [ $skip_system_binary_test ]; then + rlLogInfo "ltrace output does not contain more than 10 lines (expected failure)" + else + rlFail "ltrace output does not contain more than 10 lines" + fi + fi + rlPhaseEnd + + rlPhaseStartCleanup "Doing clean-up" + rlFileSubmit ltrace-test.log + rlFileSubmit ltrace-test-sys.log + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd From 644de0d37c2a18e620ec1045d68e846440484484 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:02 +0200 Subject: [PATCH 066/100] Import RHEL's regression test for #427444 --- .../Makefile | 62 +++++++++++++++++ .../PURPOSE | 1 + .../main.fmf | 17 +++++ .../reproducer.c | 69 +++++++++++++++++++ .../runtest.sh | 46 +++++++++++++ 5 files changed, 195 insertions(+) create mode 100644 tests/Regression/427444-ltrace-crashes-process-to-be-analysed/Makefile create mode 100644 tests/Regression/427444-ltrace-crashes-process-to-be-analysed/PURPOSE create mode 100644 tests/Regression/427444-ltrace-crashes-process-to-be-analysed/main.fmf create mode 100644 tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c create mode 100755 tests/Regression/427444-ltrace-crashes-process-to-be-analysed/runtest.sh diff --git a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/Makefile b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/Makefile new file mode 100644 index 0000000..b3b39d4 --- /dev/null +++ b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/Makefile @@ -0,0 +1,62 @@ +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + + +TOPLEVEL_NAMESPACE=/tools +PACKAGE_NAME=ltrace +RELATIVE_PATH=Regression/427444-ltrace-crashes-process-to-be-analysed + +export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + + +$(METADATA): Makefile + @touch $(METADATA) + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: ltrace crashes process to be analysed" >> $(METADATA) + @echo "Bug: 427444" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: gcc" >> $(METADATA) + @echo "Requires: glibc-devel" >> $(METADATA) + @echo "License: GPLv3+" >> $(METADATA) + + rhts-lint $(METADATA) + diff --git a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/PURPOSE b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/PURPOSE new file mode 100644 index 0000000..3d0230b --- /dev/null +++ b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/PURPOSE @@ -0,0 +1 @@ +ltrace could possibly crash traced application on s390 and s390x. diff --git a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/main.fmf b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/main.fmf new file mode 100644 index 0000000..6430ffa --- /dev/null +++ b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/main.fmf @@ -0,0 +1,17 @@ +summary: ltrace crashes process to be analysed +description: | + ltrace could possibly crash traced application on s390 and s390x. +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- glibc-devel +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=427444 +extra-summary: /tools/ltrace/Regression/427444-ltrace-crashes-process-to-be-analysed +extra-task: /tools/ltrace/Regression/427444-ltrace-crashes-process-to-be-analysed diff --git a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c new file mode 100644 index 0000000..d0ccb5d --- /dev/null +++ b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c @@ -0,0 +1,69 @@ +#include +#include +#include +#include +#include + + +#ifndef NI_MAXHOST +#define NI_MAXHOST 1025 +#endif // NI_MAX_HOST + +// On a DARWIN system EAI_OVERFLOW is define as EAI_MAX +#ifndef EAI_OVERFLOW +#define EAI_OVERFLOW EAI_MAX +#endif // EAI_OVERFLOW + +int main(int argc, char *argv[]) +{ +// sleep before we can catch you via ltrace + sleep(5); + struct addrinfo * result; + + size_t hostname_len = NI_MAXHOST; + char * hostname = NULL; + + int error; + + if ( 0 != ( error = getaddrinfo( "www.example.com", NULL, NULL, &result ) ) ) + { + fprintf( stderr, "error using getaddrinfo: %s\n", gai_strerror( error ) ); + } + + if ( result ) + { + for( ; ; hostname_len *= 2 ) + { + hostname = ( char * ) realloc( hostname, hostname_len ); + + if ( NULL == hostname ) + { + perror( "" ); + break; + } + + error = getnameinfo( result->ai_addr, result->ai_addrlen, hostname, hostname_len, NULL, 0, 0 ); + + if ( 0 == error ) + { + break; + } + + if ( EAI_OVERFLOW != error ) + { + fprintf( stderr, "error using getaddrinfo: %s\n", gai_strerror( error ) ); + break; + } + } + + if ( NULL != hostname ) + { + free( hostname ); + } + + freeaddrinfo( result ); + } + + return 0; +} + diff --git a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/runtest.sh b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/runtest.sh new file mode 100755 index 0000000..d945edc --- /dev/null +++ b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/runtest.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + +# source the test script helpers +. /usr/bin/rhts_environment.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup "Gathering information & compiling" + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlShowRunningKernel + + rlRun "gcc reproducer.c -o reproducer" 0 "Compiling the reproducer" + rlPhaseEnd + + rlPhaseStartTest "Testing the executable under ltrace" + rlRun "./reproducer &" 0 "Fire the reproducer in the background" + rlWatchdog "ltrace -o ltrace-test.log -p $( pgrep reproducer )" 200 + rlAssertNotGrep "gimme_arg called with wrong arguments" ltrace-test.log + rlPhaseEnd + + rlPhaseStartCleanup "Doing clean-up" + rlBundleLogs "ltrace-outputs" ltrace-test.log + rlRun "rm -f ltrace-test.log reproducer" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd From 724196798c3bfef09e58d478ace94929afa7009d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:02 +0200 Subject: [PATCH 067/100] Import RHEL's regression test for #235671 --- .../Makefile | 60 +++++++++++++++++++ .../PURPOSE | 2 + .../main.fmf | 16 +++++ .../runtest.sh | 43 +++++++++++++ 4 files changed, 121 insertions(+) create mode 100644 tests/Regression/235671-ltrace-receives-SIGILL-signal/Makefile create mode 100644 tests/Regression/235671-ltrace-receives-SIGILL-signal/PURPOSE create mode 100644 tests/Regression/235671-ltrace-receives-SIGILL-signal/main.fmf create mode 100755 tests/Regression/235671-ltrace-receives-SIGILL-signal/runtest.sh diff --git a/tests/Regression/235671-ltrace-receives-SIGILL-signal/Makefile b/tests/Regression/235671-ltrace-receives-SIGILL-signal/Makefile new file mode 100644 index 0000000..baafe0e --- /dev/null +++ b/tests/Regression/235671-ltrace-receives-SIGILL-signal/Makefile @@ -0,0 +1,60 @@ +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + + +TOPLEVEL_NAMESPACE=/tools +PACKAGE_NAME=ltrace +RELATIVE_PATH=Regression/235671-ltrace-receives-SIGILL-signal + +export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + + +$(METADATA): Makefile + @touch $(METADATA) + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: ltrace receives SIGILL signal and terminates" >> $(METADATA) + @echo "Bug: 235671" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) + @echo "License: GPLv3+" >> $(METADATA) + + rhts-lint $(METADATA) + diff --git a/tests/Regression/235671-ltrace-receives-SIGILL-signal/PURPOSE b/tests/Regression/235671-ltrace-receives-SIGILL-signal/PURPOSE new file mode 100644 index 0000000..e727338 --- /dev/null +++ b/tests/Regression/235671-ltrace-receives-SIGILL-signal/PURPOSE @@ -0,0 +1,2 @@ +ltrace receives SIGILL signal instead of the ltraced program, +which terminates ltrace. diff --git a/tests/Regression/235671-ltrace-receives-SIGILL-signal/main.fmf b/tests/Regression/235671-ltrace-receives-SIGILL-signal/main.fmf new file mode 100644 index 0000000..f1ba1aa --- /dev/null +++ b/tests/Regression/235671-ltrace-receives-SIGILL-signal/main.fmf @@ -0,0 +1,16 @@ +summary: ltrace receives SIGILL signal and terminates +description: | + ltrace receives SIGILL signal instead of the ltraced program, + which terminates ltrace. +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=235671 +extra-summary: /tools/ltrace/Regression/235671-ltrace-receives-SIGILL-signal +extra-task: /tools/ltrace/Regression/235671-ltrace-receives-SIGILL-signal diff --git a/tests/Regression/235671-ltrace-receives-SIGILL-signal/runtest.sh b/tests/Regression/235671-ltrace-receives-SIGILL-signal/runtest.sh new file mode 100755 index 0000000..8682bb6 --- /dev/null +++ b/tests/Regression/235671-ltrace-receives-SIGILL-signal/runtest.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + +# source the test script helpers +. /usr/bin/rhts_environment.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup "Gathering information" + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlShowRunningKernel + rlPhaseEnd + + rlPhaseStartTest "Running tar inside ltrace" + rlRun "ltrace -o ltrace-test.log tar" 0 "ltrace is crunching tar" + rlAssertNotGrep "SIGILL" ltrace-test.log -A1 + rlPhaseEnd + + rlPhaseStartCleanup "Doing clean-up" + rlBundleLogs "ltrace-outputs" ltrace-test.log + rlRun "rm -f ltrace-test.log" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd From 6dd7382d3cc24ec3d122e3c6db187e7115b10657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:02 +0200 Subject: [PATCH 068/100] Import RHEL's regression test for #223732 --- .../223732-man-page-of-ltrace/Makefile | 60 +++++++++++++++++++ .../223732-man-page-of-ltrace/PURPOSE | 7 +++ .../223732-man-page-of-ltrace/main.fmf | 21 +++++++ .../223732-man-page-of-ltrace/runtest.sh | 41 +++++++++++++ 4 files changed, 129 insertions(+) create mode 100644 tests/Regression/223732-man-page-of-ltrace/Makefile create mode 100644 tests/Regression/223732-man-page-of-ltrace/PURPOSE create mode 100644 tests/Regression/223732-man-page-of-ltrace/main.fmf create mode 100755 tests/Regression/223732-man-page-of-ltrace/runtest.sh diff --git a/tests/Regression/223732-man-page-of-ltrace/Makefile b/tests/Regression/223732-man-page-of-ltrace/Makefile new file mode 100644 index 0000000..c303f27 --- /dev/null +++ b/tests/Regression/223732-man-page-of-ltrace/Makefile @@ -0,0 +1,60 @@ +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + + +TOPLEVEL_NAMESPACE=/tools +PACKAGE_NAME=ltrace +RELATIVE_PATH=Regression/223732-man-page-of-ltrace + +export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + + +$(METADATA): Makefile + @touch $(METADATA) + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: man page of ltrace had a note about ELF32-support-only" >> $(METADATA) + @echo "Bug: 223732" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) + @echo "License: GPLv3+" >> $(METADATA) + + rhts-lint $(METADATA) + diff --git a/tests/Regression/223732-man-page-of-ltrace/PURPOSE b/tests/Regression/223732-man-page-of-ltrace/PURPOSE new file mode 100644 index 0000000..8f8da66 --- /dev/null +++ b/tests/Regression/223732-man-page-of-ltrace/PURPOSE @@ -0,0 +1,7 @@ +Man page of ltrace said, +'Only ELF32 binaries are supported.' + +I seemed ltrace does not support ia64 architecture. + +That's not true. + diff --git a/tests/Regression/223732-man-page-of-ltrace/main.fmf b/tests/Regression/223732-man-page-of-ltrace/main.fmf new file mode 100644 index 0000000..ef24105 --- /dev/null +++ b/tests/Regression/223732-man-page-of-ltrace/main.fmf @@ -0,0 +1,21 @@ +summary: man page of ltrace had a note about ELF32-support-only +description: |+ + Man page of ltrace said, + 'Only ELF32 binaries are supported.' + + I seemed ltrace does not support ia64 architecture. + + That's not true. + +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=223732 +extra-summary: /tools/ltrace/Regression/223732-man-page-of-ltrace +extra-task: /tools/ltrace/Regression/223732-man-page-of-ltrace diff --git a/tests/Regression/223732-man-page-of-ltrace/runtest.sh b/tests/Regression/223732-man-page-of-ltrace/runtest.sh new file mode 100755 index 0000000..3f794dc --- /dev/null +++ b/tests/Regression/223732-man-page-of-ltrace/runtest.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + +# source the test script helpers +. /usr/bin/rhts_environment.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE=ltrace + +rlJournalStart + rlPhaseStartSetup "Gathering information" + rlShowPackageVersion $PACKAGE + rlShowRunningKernel + rlPhaseEnd + + rlPhaseStartTest "Running tar inside ltrace" + man ltrace > trace.man + rlAssertNotGrep "Only ELF32 binaries are supported" trace.man + rlPhaseEnd + + rlPhaseStartCleanup "Doing clean-up" + rm -f trace.man + rlPhaseEnd + rlJournalPrintText +rlJournalEnd From 6c7c2d2b361fe8bf8120d20ec2d588ada36695fb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:02 +0200 Subject: [PATCH 069/100] Import RHEL's regression test for #211163 --- .../Makefile | 61 ++++++++++ .../PURPOSE | 1 + .../main.fmf | 17 +++ .../reproducer.c | 9 ++ .../runtest.sh | 109 ++++++++++++++++++ 5 files changed, 197 insertions(+) create mode 100644 tests/Regression/211163-ltrace-with--c-omit-execl-call/Makefile create mode 100644 tests/Regression/211163-ltrace-with--c-omit-execl-call/PURPOSE create mode 100644 tests/Regression/211163-ltrace-with--c-omit-execl-call/main.fmf create mode 100644 tests/Regression/211163-ltrace-with--c-omit-execl-call/reproducer.c create mode 100755 tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh diff --git a/tests/Regression/211163-ltrace-with--c-omit-execl-call/Makefile b/tests/Regression/211163-ltrace-with--c-omit-execl-call/Makefile new file mode 100644 index 0000000..30571dd --- /dev/null +++ b/tests/Regression/211163-ltrace-with--c-omit-execl-call/Makefile @@ -0,0 +1,61 @@ +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + + +TOPLEVEL_NAMESPACE=/tools +PACKAGE_NAME=ltrace +RELATIVE_PATH=Regression/211163-ltrace-with--c-omit-execl-call + +export TEST=/tools/ltrace/Regression/211163-ltrace-with--c-omit-execl-call +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + + +$(METADATA): Makefile + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: ltrace with -c omit execl call" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace gcc glibc-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv3+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 211163 528466" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/211163-ltrace-with--c-omit-execl-call/PURPOSE b/tests/Regression/211163-ltrace-with--c-omit-execl-call/PURPOSE new file mode 100644 index 0000000..4dd4371 --- /dev/null +++ b/tests/Regression/211163-ltrace-with--c-omit-execl-call/PURPOSE @@ -0,0 +1 @@ +ltrace with -c omit execl call diff --git a/tests/Regression/211163-ltrace-with--c-omit-execl-call/main.fmf b/tests/Regression/211163-ltrace-with--c-omit-execl-call/main.fmf new file mode 100644 index 0000000..aa6cfa6 --- /dev/null +++ b/tests/Regression/211163-ltrace-with--c-omit-execl-call/main.fmf @@ -0,0 +1,17 @@ +summary: ltrace with -c omit execl call +description: | + ltrace with -c omit execl call +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- glibc-devel +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=211163 +extra-summary: /tools/ltrace/Regression/211163-ltrace-with--c-omit-execl-call +extra-task: /tools/ltrace/Regression/211163-ltrace-with--c-omit-execl-call diff --git a/tests/Regression/211163-ltrace-with--c-omit-execl-call/reproducer.c b/tests/Regression/211163-ltrace-with--c-omit-execl-call/reproducer.c new file mode 100644 index 0000000..7a7847e --- /dev/null +++ b/tests/Regression/211163-ltrace-with--c-omit-execl-call/reproducer.c @@ -0,0 +1,9 @@ +#include +#include + +int main() +{ + execl("/bin/ls","ls",0); + return 0; +} + diff --git a/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh b/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh new file mode 100755 index 0000000..68b0814 --- /dev/null +++ b/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh @@ -0,0 +1,109 @@ +#!/bin/bash + +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + +# source the test script helpers +. /usr/bin/rhts_environment.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE=$(rpm -qf $(which ltrace)) + +rlJournalStart + rlPhaseStartSetup "Gathering information & compiling" + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlShowRunningKernel + + rlRun "gcc reproducer.c -o reproducer" 0 "Compiling the reproducer" + rlPhaseEnd + + rlPhaseStartTest "Counting the number of calls noted by ltrace" + rlRun "ltrace -o ltrace-test-c.log -c ./reproducer" 0 "Execute reproducer" + rlRun "cat -n ltrace-test-c.log" + # Check if exec is not omitted (rhbz#797761) + rlAssertGrep "exec" ltrace-test-c.log + + # Check if ltrace is able to trace system binaries with execl /bin/ls (rhbz#1618748/rhbz#1655368/rhbz#1731119) + if rlIsRHEL 8; then + case "$PACKAGE" in + ltrace*) + # bz#1655368 was fixed on ltrace-0.7.91-28.el8.x86_64, but it is still reproducible on ppc64le + if [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL8 ltrace fails to trace system binaries on ppc64le due to bz#1618748/bz#1655368, hence skipping failure checking" + skip_test=1 + fi + ;; + gcc-toolset-*) + if [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL8 gcc-toolset-*-ltrace fails to trace system binaries on ppc64le due to bz#1731119, hence skipping failure checking" + skip_test=1 + fi + ;; + esac + elif rlIsRHEL 9 && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL-9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking" + skip_test=1 + elif rlIsFedora 33 && [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "FC33 ltrace fails to trace system binaries on ppc64le due to bz#1902770, hence skipping failure checking" + skip_test=1 + fi + + rlRun "n_lines_c=$(grep -c . ltrace-test-c.log)" + if [ $n_lines_c -gt 20 ]; then + if [ $skip_test ]; then + rlLogWarning "Test was skipped but it seems ok. Review skip check." + fi + else + if [ $skip_test ]; then + rlLogInfo"'ltrace -c ./reproducer' does not report more than 20 lines of trace summary output (expected failure)" + else + rlFail "'ltrace -c ./reproducer' does not report more than 20 lines of trace summary output" + fi + fi + rlPhaseEnd + + rlPhaseStartTest "Looking for SEGFAULT of reproducer under ltrace" + rlRun "ltrace -o ltrace-test.log ./reproducer" 0 "Execute reproducer" + rlRun "cat -n ltrace-test.log" + # Check if neither segfault nor 'unexpected breakpoint' errors occur (rhbz#211163) + rlAssertNotGrep "SIGSEGV" ltrace-test.log + rlAssertNotGrep "unexpected breakpoint" ltrace-test.log + # Check if exec is not omitted (rhbz#797761) + rlAssertGrep "exec" ltrace-test.log + + # Check if ltrace is able to trace system binaries with execl /bin/ls (rhbz#1618748/rhbz#1655368/rhbz#1731119) + rlRun "n_lines=$(grep -c . ltrace-test.log)" + if [ $n_lines -gt 20 ]; then + if [ $skip_test ]; then + rlLogWarning "Test was skipped but it seems ok. Review skip check." + fi + else + if [ $skip_test ]; then + rlLogInfo"'ltrace ./reproducer' does not report more than 20 lines of trace summary output (expected failure)" + else + rlFail "'ltrace ./reproducer' does not report more than 20 lines of trace summary output" + fi + fi + rlPhaseEnd + + rlPhaseStartCleanup "Doing clean-up" + rlBundleLogs "ltrace-outputs" ltrace-test.log ltrace-test-c.log + rlRun "rm -f ltrace-test.log ltrace-test-c.log reproducer" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd From 9af7a027b204184dd0c7f5f8403dd37b3eec18a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:16:02 +0200 Subject: [PATCH 070/100] Import RHEL's regression test for #211135 --- .../Makefile | 61 +++++++++++++++++++ .../PURPOSE | 2 + .../main.fmf | 17 ++++++ .../reproducer.c | 31 ++++++++++ .../runtest.sh | 49 +++++++++++++++ 5 files changed, 160 insertions(+) create mode 100644 tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/Makefile create mode 100644 tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/PURPOSE create mode 100644 tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/main.fmf create mode 100644 tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c create mode 100755 tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/runtest.sh diff --git a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/Makefile b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/Makefile new file mode 100644 index 0000000..67183de --- /dev/null +++ b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/Makefile @@ -0,0 +1,61 @@ +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + + +TOPLEVEL_NAMESPACE=/tools +PACKAGE_NAME=ltrace +RELATIVE_PATH=Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option + +export TEST=$(TOPLEVEL_NAMESPACE)/$(PACKAGE_NAME)/$(RELATIVE_PATH) +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x ./runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + + +$(METADATA): Makefile + @touch $(METADATA) + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Description: ltrace hangs while tracing child process with -f option" >> $(METADATA) + @echo "Bug: 211135" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: $(PACKAGE_NAME)" >> $(METADATA) + @echo "Requires: glibc-devel" >> $(METADATA) + @echo "License: GPLv3+" >> $(METADATA) + + rhts-lint $(METADATA) + diff --git a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/PURPOSE b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/PURPOSE new file mode 100644 index 0000000..2c9e3fd --- /dev/null +++ b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/PURPOSE @@ -0,0 +1,2 @@ +ltrace could possibly crash/hang when tracing fork() on ppc/ppc64 +in ltrace with option "-f". diff --git a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/main.fmf b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/main.fmf new file mode 100644 index 0000000..f0627ff --- /dev/null +++ b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/main.fmf @@ -0,0 +1,17 @@ +summary: ltrace hangs while tracing child process with -f option +description: | + ltrace could possibly crash/hang when tracing fork() on ppc/ppc64 + in ltrace with option "-f". +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- glibc-devel +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=211135 +extra-summary: /tools/ltrace/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option +extra-task: /tools/ltrace/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option diff --git a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c new file mode 100644 index 0000000..1d11ad6 --- /dev/null +++ b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c @@ -0,0 +1,31 @@ +/* Ltrace Test : trace-fork.c + * Objectives : Verify that ltrace can trace to child process after + * fork called. + * + * This file was written by Yao Qi + * + */ + +#include +#include + +void child() { + printf("Fork Child\n"); + sleep(1); +} + +int main() { + pid_t pid; + pid = fork (); + + if (pid == -1) + printf("fork failed!\n"); + else if (pid == 0) + child(); + else { + printf("My child pid is %d\n",pid); + wait(); + } + return 0; +} + diff --git a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/runtest.sh b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/runtest.sh new file mode 100755 index 0000000..ce3bf9f --- /dev/null +++ b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/runtest.sh @@ -0,0 +1,49 @@ +#!/bin/bash +# +# Copyright (c) 2008 Red Hat, Inc. All rights reserved. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# +# Author: Michal Nowak + +# source the test script helpers +. /usr/bin/rhts_environment.sh +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup "Gathering information & compiling" + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlShowRunningKernel + + rlRun "gcc reproducer.c -o reproducer" 0 "Compiling the reproducer" + rlPhaseEnd + + rlPhaseStartTest + rlRun "ltrace -o ltrace-test.log -f ./reproducer" 0 "'ltrace -f' is crunching the reproducer" + + rlAssertGrep "My child pid is" ltrace-test.log + rlAssertNotGrep "signal from wrong pid" ltrace-test.log + rlAssertGrep "SIGCHLD (Child exited)" ltrace-test.log + rlAssertNotGrep "Cannot attach to pid" ltrace-test.log + rlPhaseEnd + + rlPhaseStartCleanup "Doing clean-up" + rlBundleLogs "ltrace-outputs" ltrace-test.log + rlRun "rm -f ltrace-test.log reproducer" + rlPhaseEnd + rlJournalPrintText +rlJournalEnd From f20f6a9ea6142c1f833e298849d80e8440609d1c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:24:04 +0200 Subject: [PATCH 071/100] Import RHEL's regression test for #1158713 Note: I've prefixed the test with "bz1158713-" because ltrace's repo in Fedora ignores "ltrace-*/". See the .gitignore file. --- .../Makefile | 63 +++++++++++ .../PURPOSE | 5 + .../main.fmf | 18 +++ .../runtest.sh | 107 ++++++++++++++++++ 4 files changed, 193 insertions(+) create mode 100644 tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/Makefile create mode 100644 tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/PURPOSE create mode 100644 tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/main.fmf create mode 100755 tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh diff --git a/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/Makefile b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/Makefile new file mode 100644 index 0000000..29d9876 --- /dev/null +++ b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/Makefile @@ -0,0 +1,63 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +# Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace gcc gawk" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1158713" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/PURPOSE b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/PURPOSE new file mode 100644 index 0000000..87ed099 --- /dev/null +++ b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +Author: Martin Cermak +Bug summary: ltrace assigns wrong names to glibc PLT slots +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1158713 diff --git a/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/main.fmf b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/main.fmf new file mode 100644 index 0000000..8beae33 --- /dev/null +++ b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/main.fmf @@ -0,0 +1,18 @@ +summary: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +description: | + Bug summary: ltrace assigns wrong names to glibc PLT slots + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1158713 +contact: Martin Cermak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- gawk +duration: 10m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1158713 +extra-summary: /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +extra-task: /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots diff --git a/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh new file mode 100755 index 0000000..9758773 --- /dev/null +++ b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh @@ -0,0 +1,107 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +# Description: bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlRun "TMPD=$(mktemp -d)" + rlRun "pushd $TMPD" + + cat > test.c < +#include +#include +#include + +int main() +{ + char *s = malloc(1000); + + // trigger a free() call from libc: + setpwent(); + getpwent(); + endpwent(); + + // print maps + sprintf(s, "grep -F '[heap]' /proc/%d/maps", getpid()); + system (s); + + free(s); +} +EOFA + + cat > test.awk < limit_max) { + print "ERROR 2 ("addrs[i]">"limit_max")" + exit 2 + } + } +} +EOFB + + rlRun "gcc test.c -o test" + rlPhaseEnd + + rlPhaseStartTest + rlRun "ltrace -e free ./test |& tee log | awk -f test.awk" || \ + rlRun "cat log" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TMPD" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From d73a4e1684d08fe110d4f777572fc7db6959fab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 13:29:09 +0200 Subject: [PATCH 072/100] Import a regression test from RHEL. Sorry, no specific bug number, it wasn't recorded at that time and now I can't find it, at least easily. --- .../Makefile | 64 ++++++++++++++ .../pthread-program-assertion-failure/PURPOSE | 6 ++ .../main.fmf | 16 ++++ .../runtest.sh | 83 +++++++++++++++++++ 4 files changed, 169 insertions(+) create mode 100644 tests/Regression/pthread-program-assertion-failure/Makefile create mode 100644 tests/Regression/pthread-program-assertion-failure/PURPOSE create mode 100644 tests/Regression/pthread-program-assertion-failure/main.fmf create mode 100755 tests/Regression/pthread-program-assertion-failure/runtest.sh diff --git a/tests/Regression/pthread-program-assertion-failure/Makefile b/tests/Regression/pthread-program-assertion-failure/Makefile new file mode 100644 index 0000000..bb8e743 --- /dev/null +++ b/tests/Regression/pthread-program-assertion-failure/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Regression/pthread-program-assertion-failure +# Description: pthread-program-assertion-failure +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Regression/pthread-program-assertion-failure +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: pthread-program-assertion-failure" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 10m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Requires: gcc" >> $(METADATA) + @echo "Requires: glibc-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Regression/pthread-program-assertion-failure/PURPOSE b/tests/Regression/pthread-program-assertion-failure/PURPOSE new file mode 100644 index 0000000..00eb57b --- /dev/null +++ b/tests/Regression/pthread-program-assertion-failure/PURPOSE @@ -0,0 +1,6 @@ +PURPOSE of /tools/ltrace/Regression/pthread-program-assertion-failure +Description: pthread-program-assertion-failure +Author: Martin Cermak + +Issue reproduced using an f20 arm (32 bit) fedora system with ltrace-0.7.91-13.fc22.armv7hl. + diff --git a/tests/Regression/pthread-program-assertion-failure/main.fmf b/tests/Regression/pthread-program-assertion-failure/main.fmf new file mode 100644 index 0000000..0e9d856 --- /dev/null +++ b/tests/Regression/pthread-program-assertion-failure/main.fmf @@ -0,0 +1,16 @@ +summary: pthread-program-assertion-failure +description: |+ + Issue reproduced using an f20 arm (32 bit) fedora system with ltrace-0.7.91-13.fc22.armv7hl. + +contact: Martin Cermak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- glibc-devel +duration: 10m +extra-summary: /tools/ltrace/Regression/pthread-program-assertion-failure +extra-task: /tools/ltrace/Regression/pthread-program-assertion-failure diff --git a/tests/Regression/pthread-program-assertion-failure/runtest.sh b/tests/Regression/pthread-program-assertion-failure/runtest.sh new file mode 100755 index 0000000..a2b1c31 --- /dev/null +++ b/tests/Regression/pthread-program-assertion-failure/runtest.sh @@ -0,0 +1,83 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Regression/pthread-program-assertion-failure +# Description: pthread-program-assertion-failure +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +PACKAGE="$(rpm -qf $(which ltrace))" + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlAssertRpm $(rpm -qf $(which gcc)) + rlRun "TMP=\$(mktemp -d)" + rlRun "pushd $TMP" + cat > test.c < +#include + +extern void print (char *); + +#define PRINT_LOOP 10 + +void * +th_main (void *arg) +{ + int i; + for (i=0; i Date: Wed, 19 May 2021 14:59:30 +0200 Subject: [PATCH 073/100] Log more information in a regression test To make the bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch work not only for regular builds but for scratch builds as well, we need to know how to refer them. This commit is just a temporary attempt to find the environment variable holding the reference. I'll make use of it in a follow-up commit. --- .../runtest.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh index 4f7fecc..380c4d6 100755 --- a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh +++ b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh @@ -35,6 +35,7 @@ export $PACKAGE rlJournalStart rlPhaseStartSetup + rlLogInfo "$(env)" rlAssertRpm $PACKAGE rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" From 04309572bed8f60c57eb92b4b004e900e1c8ea11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 19 May 2021 15:40:27 +0200 Subject: [PATCH 074/100] Remove RHEL's test for #1427140 Right now it cannot work; it needs to access the source RPM for the ltrace being tested which, in case of scratch builds, isn't currently possible. --- .../Makefile | 64 ------------------- .../PURPOSE | 5 -- .../main.fmf | 27 -------- .../runtest.sh | 56 ---------------- 4 files changed, 152 deletions(-) delete mode 100644 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile delete mode 100644 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE delete mode 100644 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf delete mode 100755 tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile deleted file mode 100644 index 664b7c4..0000000 --- a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/Makefile +++ /dev/null @@ -1,64 +0,0 @@ -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Makefile of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch -# Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -export TEST=/tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch -export TESTVERSION=1.0 - -BUILT_FILES= - -FILES=$(METADATA) runtest.sh Makefile PURPOSE - -.PHONY: all install download clean - -run: $(FILES) build - ./runtest.sh - -build: $(BUILT_FILES) - test -x runtest.sh || chmod a+x runtest.sh - -clean: - rm -f *~ $(BUILT_FILES) - - -include /usr/share/rhts/lib/rhts-make.include - -$(METADATA): Makefile - @echo "Owner: Michal Kolar " > $(METADATA) - @echo "Name: $(TEST)" >> $(METADATA) - @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) - @echo "Path: $(TEST_DIR)" >> $(METADATA) - @echo "Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch)" >> $(METADATA) - @echo "Type: Regression" >> $(METADATA) - @echo "TestTime: 30m" >> $(METADATA) - @echo "RunFor: ltrace" >> $(METADATA) - @echo "Requires: ltrace autoconf automake dejagnu elfutils-devel elfutils-libelf-devel libselinux-devel libtool scl-utils-build yum-utils" >> $(METADATA) - @echo "Priority: Normal" >> $(METADATA) - @echo "License: GPLv2+" >> $(METADATA) - @echo "Confidential: no" >> $(METADATA) - @echo "Destructive: no" >> $(METADATA) - @echo "Bug: 1427140" >> $(METADATA) - @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) - - rhts-lint $(METADATA) diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE deleted file mode 100644 index 321dfcd..0000000 --- a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/PURPOSE +++ /dev/null @@ -1,5 +0,0 @@ -PURPOSE of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch -Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) -Author: Michal Kolar -Bug summary: ltrace: ltrace-0.7.91-unwind-elfutils.patch modifies backup file created by previous patch -Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1427140 diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf deleted file mode 100644 index e8f7554..0000000 --- a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/main.fmf +++ /dev/null @@ -1,27 +0,0 @@ -summary: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) -description: | - Bug summary: ltrace: ltrace-0.7.91-unwind-elfutils.patch modifies backup file created by previous patch - Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1427140 -contact: Michal Kolar -component: -- ltrace -test: ./runtest.sh -framework: beakerlib -recommend: -- ltrace -- autoconf -- automake -- dejagnu -- elfutils-devel -- elfutils-libelf-devel -- libselinux-devel -- libtool -- scl-utils-build -- yum-utils -- koji -- rpm-build -duration: 30m -link: -- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1427140 -extra-summary: /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch -extra-task: /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch diff --git a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh b/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh deleted file mode 100755 index 380c4d6..0000000 --- a/tests/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch/runtest.sh +++ /dev/null @@ -1,56 +0,0 @@ -#!/bin/bash -# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# runtest.sh of /tools/ltrace/Regression/bz1427140-ltrace-ltrace-0-7-91-unwind-elfutils-patch -# Description: Test for BZ#1427140 (ltrace ltrace-0.7.91-unwind-elfutils.patch) -# Author: Michal Kolar -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# -# Copyright (c) 2017 Red Hat, Inc. -# -# This program is free software: you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation, either version 2 of -# the License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be -# useful, but WITHOUT ANY WARRANTY; without even the implied -# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see http://www.gnu.org/licenses/. -# -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -# Include Beaker environment -. /usr/share/beakerlib/beakerlib.sh || exit 1 - -CMD='ltrace' -BIN=$(which --skip-alias $CMD) -PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}" -export $PACKAGE - -rlJournalStart - rlPhaseStartSetup - rlLogInfo "$(env)" - rlAssertRpm $PACKAGE - rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" - rlRun "pushd $TmpDir" - rlRun "koji download-build --arch=src $(rpm -q $PACKAGE)" - rlRun "rpm --define='_topdir $TmpDir' -Uvh *src.rpm" - rlRun "dnf builddep -y SPECS/*.spec" - rlPhaseEnd - - rlPhaseStartTest - rlRun "rpmbuild -bp --define='_topdir $TmpDir' --define='_default_patch_flags -s --no-backup-if-mismatch' --quiet SPECS/*.spec" - rlPhaseEnd - - rlPhaseStartCleanup - rlRun "popd" - rlRun "rm -r $TmpDir" 0 "Removing tmp directory" - rlPhaseEnd -rlJournalPrintText -rlJournalEnd From 5ed23e066e2d40ea0e94593b5fcfb73e16094b96 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 22 Jul 2021 13:14:52 +0000 Subject: [PATCH 075/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 7602f71..67a4ff8 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 41%{?dist} +Release: 42%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -207,6 +207,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jul 22 2021 Fedora Release Engineering - 0.7.91-42 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + * Mon Feb 8 2021 DJ Delorie - 0.7.91-41 - Add support for SCV syscall insn for ppc64le From c8ea90148a887a5cf760c5a8c229983b348e9290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Fri, 9 Jul 2021 16:20:03 +0200 Subject: [PATCH 076/100] Import RHEL's test for RFE #1449588 --- .../Makefile | 64 +++++++++++++++++++ .../PURPOSE | 5 ++ .../main.fmf | 16 +++++ .../runtest.sh | 53 +++++++++++++++ 4 files changed, 138 insertions(+) create mode 100644 tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/Makefile create mode 100644 tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/PURPOSE create mode 100644 tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/main.fmf create mode 100755 tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/runtest.sh diff --git a/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/Makefile b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/Makefile new file mode 100644 index 0000000..dc867e7 --- /dev/null +++ b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support +# Description: Test for BZ#1449588 (Can ltrace be built with backtrace support?) +# Author: Edjunior Machado +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2018 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Edjunior Machado " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Test for BZ#1449588 (Can ltrace be built with backtrace support?)" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 5m" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + @echo "Bug: 1449588" >> $(METADATA) + @echo "Releases: -RHEL4 -RHELClient5 -RHELServer5" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/PURPOSE b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/PURPOSE new file mode 100644 index 0000000..6da4e88 --- /dev/null +++ b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/PURPOSE @@ -0,0 +1,5 @@ +PURPOSE of /tools/ltrace/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support +Description: Test for BZ#1449588 (Can ltrace be built with backtrace support?) +Author: Edjunior Machado +Bug summary: Can ltrace be built with backtrace support? +Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1449588 diff --git a/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/main.fmf b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/main.fmf new file mode 100644 index 0000000..91de65d --- /dev/null +++ b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/main.fmf @@ -0,0 +1,16 @@ +summary: Test for BZ#1449588 (Can ltrace be built with backtrace support?) +description: | + Bug summary: Can ltrace be built with backtrace support? + Bugzilla link: https://bugzilla.redhat.com/show_bug.cgi?id=1449588 +contact: Edjunior Machado +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +duration: 5m +link: +- relates: https://bugzilla.redhat.com/show_bug.cgi?id=1449588 +extra-summary: /tools/ltrace/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support +extra-task: /tools/ltrace/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support diff --git a/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/runtest.sh b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/runtest.sh new file mode 100755 index 0000000..829db70 --- /dev/null +++ b/tests/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support/runtest.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Sanity/bz1449588-Can-ltrace-be-built-with-backtrace-support +# Description: Test for BZ#1449588 (Can ltrace be built with backtrace support?) +# Author: Edjunior Machado +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2018 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +CMD="ltrace" +PACKAGE=$(rpm -qf $(which $CMD)) + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "pushd $TmpDir" + rlPhaseEnd + + rlPhaseStartTest + set -o pipefail + rlRun -l "ltrace --help |& tee help-output.log" 0 "Collecting help output" + rlRun -l "grep -- '-w, --where=NR.*print backtrace showing NR stack frames at most.' help-output.log" 0 "Checking if '-w, --where=NR' parameter is available on help output" + rlRun -l "ltrace -w 4 /bin/ls" 0 "Trivial smoke test" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 0554fda54f6173ec4244e8ffd2259039374161b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Fri, 9 Jul 2021 16:24:48 +0200 Subject: [PATCH 077/100] Import RHEL's test Sanity/random-apps Note than several sub-tests (apps) had to be removed as unsuitable for publishing. --- tests/Sanity/random-apps/Makefile | 64 ++++++ tests/Sanity/random-apps/PURPOSE | 3 + tests/Sanity/random-apps/abort.c | 6 + tests/Sanity/random-apps/main.fmf | 14 ++ .../Sanity/random-apps/many_looping_threads.c | 35 +++ tests/Sanity/random-apps/mthd2.c | 43 ++++ tests/Sanity/random-apps/reproducer.c | 14 ++ tests/Sanity/random-apps/reproducer2.c | 15 ++ tests/Sanity/random-apps/reproducer3.c | 14 ++ tests/Sanity/random-apps/runtest.sh | 101 +++++++++ tests/Sanity/random-apps/say_linux.c | 8 + tests/Sanity/random-apps/sleeping-c.c | 6 + tests/Sanity/random-apps/t_thread.c | 211 ++++++++++++++++++ tests/Sanity/random-apps/test1.c | 52 +++++ tests/Sanity/random-apps/test_fork.c | 78 +++++++ tests/Sanity/random-apps/test_select.c | 70 ++++++ tests/Sanity/random-apps/thread-test2.c | 34 +++ tests/Sanity/random-apps/vfork.c | 15 ++ 18 files changed, 783 insertions(+) create mode 100644 tests/Sanity/random-apps/Makefile create mode 100644 tests/Sanity/random-apps/PURPOSE create mode 100644 tests/Sanity/random-apps/abort.c create mode 100644 tests/Sanity/random-apps/main.fmf create mode 100644 tests/Sanity/random-apps/many_looping_threads.c create mode 100644 tests/Sanity/random-apps/mthd2.c create mode 100644 tests/Sanity/random-apps/reproducer.c create mode 100644 tests/Sanity/random-apps/reproducer2.c create mode 100644 tests/Sanity/random-apps/reproducer3.c create mode 100755 tests/Sanity/random-apps/runtest.sh create mode 100644 tests/Sanity/random-apps/say_linux.c create mode 100644 tests/Sanity/random-apps/sleeping-c.c create mode 100644 tests/Sanity/random-apps/t_thread.c create mode 100644 tests/Sanity/random-apps/test1.c create mode 100644 tests/Sanity/random-apps/test_fork.c create mode 100644 tests/Sanity/random-apps/test_select.c create mode 100644 tests/Sanity/random-apps/thread-test2.c create mode 100644 tests/Sanity/random-apps/vfork.c diff --git a/tests/Sanity/random-apps/Makefile b/tests/Sanity/random-apps/Makefile new file mode 100644 index 0000000..cc7d4a8 --- /dev/null +++ b/tests/Sanity/random-apps/Makefile @@ -0,0 +1,64 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Sanity/random-apps +# Description: Runs random app which caused strace problems in the past +# Author: Michal Nowak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Sanity/random-apps +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE *.c + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Michal Nowak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: Runs random app which caused strace problems in the past" >> $(METADATA) + @echo "Type: Sanity" >> $(METADATA) + @echo "TestTime: 1h" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Requires: gcc glibc-devel" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2" >> $(METADATA) + @echo "Confidential: yes" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity/random-apps/PURPOSE b/tests/Sanity/random-apps/PURPOSE new file mode 100644 index 0000000..49e48ae --- /dev/null +++ b/tests/Sanity/random-apps/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Sanity/random-apps +Description: Runs random app which caused strace problems in the past +Author: Michal Nowak diff --git a/tests/Sanity/random-apps/abort.c b/tests/Sanity/random-apps/abort.c new file mode 100644 index 0000000..b1db3c3 --- /dev/null +++ b/tests/Sanity/random-apps/abort.c @@ -0,0 +1,6 @@ +#include + +int main() { + abort(); +} + diff --git a/tests/Sanity/random-apps/main.fmf b/tests/Sanity/random-apps/main.fmf new file mode 100644 index 0000000..65d54ee --- /dev/null +++ b/tests/Sanity/random-apps/main.fmf @@ -0,0 +1,14 @@ +summary: Runs random app which caused strace problems in the past +description: '' +contact: Michal Nowak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- glibc-devel +duration: 1h +extra-summary: /tools/ltrace/Sanity/random-apps +extra-task: /tools/ltrace/Sanity/random-apps diff --git a/tests/Sanity/random-apps/many_looping_threads.c b/tests/Sanity/random-apps/many_looping_threads.c new file mode 100644 index 0000000..87d837b --- /dev/null +++ b/tests/Sanity/random-apps/many_looping_threads.c @@ -0,0 +1,35 @@ +#include +#include +#include +#include +#include +#include + +static int thd_no; + +static void *sub_thd(void *c) +{ + fprintf(stderr, "sub-thread %d created\n", ++thd_no); + for (;;) + getuid(); + return NULL; +} + +int main(int argc, char *argv[]) +{ + int i; + pthread_t *thd; + int num_threads = 1; + + if (argv[1]) + num_threads = atoi(argv[1]); + + thd = malloc(num_threads * sizeof(thd[0])); + fprintf(stderr, "test start, num_threads:%d...\n", num_threads); + for (i = 0; i < num_threads; i++) { + pthread_create(&thd[i], NULL, sub_thd, NULL); + fprintf(stderr, "after pthread_create\n"); + } + /* Exit. This kills all threads */ + return 0; +} diff --git a/tests/Sanity/random-apps/mthd2.c b/tests/Sanity/random-apps/mthd2.c new file mode 100644 index 0000000..6c0f154 --- /dev/null +++ b/tests/Sanity/random-apps/mthd2.c @@ -0,0 +1,43 @@ +#include +#include +#include +#include +#include + +#define NTHD 60 + +int thd_no; + + +long sub_func(void) +{ + uid_t uid; + + printf("sub-thread created: %d\n", ++thd_no); + + for (;;) { + uid = getuid(); + sleep(1); + } + + return (long)uid; +} + +void *sub_thd(void *c) +{ + sub_func(); +} + +main(int argc, char *argv[]) +{ + int i; + pthread_t thd[NTHD]; + + printf("test start...\n"); + + for (i = 0; i < NTHD; i++) { + pthread_create(&thd[i], NULL, sub_thd, NULL); + } +// pause(); +} + diff --git a/tests/Sanity/random-apps/reproducer.c b/tests/Sanity/random-apps/reproducer.c new file mode 100644 index 0000000..cca818c --- /dev/null +++ b/tests/Sanity/random-apps/reproducer.c @@ -0,0 +1,14 @@ +#include + +void *start (void *arg) { + return arg; +} + +pthread_t thread1; + +int main () { + pthread_create (&thread1, NULL, start, NULL); + sleep (1); + return 0; +} + diff --git a/tests/Sanity/random-apps/reproducer2.c b/tests/Sanity/random-apps/reproducer2.c new file mode 100644 index 0000000..404e8d6 --- /dev/null +++ b/tests/Sanity/random-apps/reproducer2.c @@ -0,0 +1,15 @@ +#include +#include + +static void h(int sig) {} + +int main() +{ + struct sigaction sa; + sigemptyset(&sa.sa_mask); + sa.sa_handler = h; + sa.sa_flags = SA_RESETHAND | SA_NODEFER; + sigaction (SIGUSR1, &sa, NULL); + return 0; +} + diff --git a/tests/Sanity/random-apps/reproducer3.c b/tests/Sanity/random-apps/reproducer3.c new file mode 100644 index 0000000..cca818c --- /dev/null +++ b/tests/Sanity/random-apps/reproducer3.c @@ -0,0 +1,14 @@ +#include + +void *start (void *arg) { + return arg; +} + +pthread_t thread1; + +int main () { + pthread_create (&thread1, NULL, start, NULL); + sleep (1); + return 0; +} + diff --git a/tests/Sanity/random-apps/runtest.sh b/tests/Sanity/random-apps/runtest.sh new file mode 100755 index 0000000..99e7612 --- /dev/null +++ b/tests/Sanity/random-apps/runtest.sh @@ -0,0 +1,101 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Sanity/random-apps +# Description: Runs random app which caused strace problems in the past +# Author: Michal Nowak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2011 Red Hat, Inc. All rights reserved. +# +# This copyrighted material is made available to anyone wishing +# to use, modify, copy, or redistribute it subject to the terms +# and conditions of the GNU General Public License version 2. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public +# License along with this program; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, +# Boston, MA 02110-1301, USA. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +CMD='ltrace' +BIN=$(which --skip-alias $CMD) +PACKAGE="$(rpm -qf --qf='%{name}\n' $BIN)" +#export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun "TmpDir=\`mktemp -d\`" 0 "Creating tmp directory" + cp *.c $TmpDir + rlRun "pushd $TmpDir" + rlPhaseEnd + + touch FAILED PASSED + PASSED_CNT=0 + FAILED_CNT=0 + ALL_CNT=0 + for test in *.c; do + RESULT="PASS" + rlPhaseStartTest "Test ${test}" + rlRun "gcc $test -o ${test}.bin -lpthread" 0 "Compile $test" + rlAssertExists "${test}.bin" + rlRun "ltrace -o ${test}.LOG -f ./${test}.bin" 0 "Run $test under ltrace" + [ $? -ne 0 ] && RESULT=FAIL + + echo + cat ${test}.LOG + echo + + rlAssertNotGrep "\-\-\- SIGKILL" ${test}.LOG + [ $? -ne 0 ] && RESULT=FAIL + rlAssertNotGrep "\-\-\- SIGSEGV" ${test}.LOG + [ $? -ne 0 ] && RESULT=FAIL + rlAssertNotGrep "\-\-\- SIGILL" ${test}.LOG + [ $? -ne 0 ] && RESULT=FAIL + rlAssertNotGrep "\-\-\- SIGTRAP" ${test}.LOG + [ $? -ne 0 ] && RESULT=FAIL + rlAssertNotGrep "\-\-\- SIGINT" ${test}.LOG + [ $? -ne 0 ] && RESULT=FAIL + if [[ "$RESULT" == "PASS" ]]; then + let "PASSED_CNT = $PASSED_CNT + 1" + echo "$test $opt" >> PASSED + else + let "FAILED_CNT = $FAILED_CNT + 1" + echo "$test $opt" >> FAILED + fi + let "ALL_CNT = $ALL_CNT + 1" + rlPhaseEnd + done + + rlPhaseStartTest + rlLog "PASSED : $PASSED_CNT of $ALL_CNT" + cat PASSED + rlLog "FAILED : $FAILED_CNT of $ALL_CNT" + cat FAILED + if [ $FAILED_CNT -eq 0 ]; then + rlPass "All testcases passed." + else + rlFail "There are some errors." + fi + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "tar c *.LOG *.bin PASSED FAILED | gzip > logs.tar.gz" + rlFileSubmit "logs.tar.gz" + rlRun "popd" + rlRun "rm -r $TmpDir" 0 "Removing tmp directory" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd diff --git a/tests/Sanity/random-apps/say_linux.c b/tests/Sanity/random-apps/say_linux.c new file mode 100644 index 0000000..79f2d61 --- /dev/null +++ b/tests/Sanity/random-apps/say_linux.c @@ -0,0 +1,8 @@ +#include +#include + +int main() { + printf("Linux\n"); + exit(0); +} + diff --git a/tests/Sanity/random-apps/sleeping-c.c b/tests/Sanity/random-apps/sleeping-c.c new file mode 100644 index 0000000..4739a56 --- /dev/null +++ b/tests/Sanity/random-apps/sleeping-c.c @@ -0,0 +1,6 @@ +#include + +int main() +{ + sleep (15); +} diff --git a/tests/Sanity/random-apps/t_thread.c b/tests/Sanity/random-apps/t_thread.c new file mode 100644 index 0000000..e1f24c3 --- /dev/null +++ b/tests/Sanity/random-apps/t_thread.c @@ -0,0 +1,211 @@ +#include +#include +#include +#include +#include +#include +#include +#include +//#include "trigger_error.h" +#define THREAD_NUM 100 +#define MALLOC_LEN 1024*1024*10 +#define DEFAULT_NUM 0 +#define MAXSEM 5 + +int fd[10000]; +int fullid; +int emptyid; +int mutxid; + +void *thread_handle_a(void *temp); + +int main(int argc, char *argv[]) +{ + pthread_t tid_a; + int i; + int ai[THREAD_NUM]; + int ret_a = -1; + int file_num; + char filename[10]; + char str[20]; + struct sembuf P, V;; + union semun arg; + pid_t pid; + + int *array; + int *sum; + int *set; + int *get; + + if (DEFAULT_NUM == 0) { + file_num = 10; + } + +#ifdef STS_SLEEP + sleep(10); +#endif + + for (i = 0; i < file_num; i++) { + sprintf(filename, "%d", i); + printf("open fd%d\n", i); + fd[i] = open(filename, O_RDONLY); + if (fd[i] < 0) + continue; + + if (read(fd[i], str, sizeof(str)) < 0) { + close(fd[i]); + fd[i] = -1; + continue; + } + printf("%s", str); + } + + for (i = 0; i < file_num; i++) { + if (fd[i] >= 0) { + close(fd[i]); + } + } + + for (i = 0; i < file_num; i++) { + fd[0] = open("/dev/null", O_RDONLY); + if (fd[0] < 0) { + perror("open /dev/null"); + continue; + } + close(fd[0]); + } + + for (i = 0; i < file_num; i++) { + fd[0] = open("/proc/meminfo", O_RDONLY); + if (fd[0] < 0) { + perror("open /proc/meminfo"); + continue; + } + if (read(fd[0], str, sizeof(str)) < 0) { + close(fd[0]); + continue; + } + printf("%s\n", str); + close(fd[0]); + } + for (i = 0; i < file_num; i++) { + fd[0] = open("/proc/self/maps", O_RDONLY); + if (fd[0] < 0) { + perror("open /proc/meminfo"); + continue; + } + if (read(fd[0], str, sizeof(str)) < 0) { + close(fd[0]); + continue; + } + printf("%s\n", str); + close(fd[0]); + } + + array = + (int *)mmap(NULL, sizeof(int) * 5, PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANONYMOUS, -1, 0); + sum = + (int *)mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANONYMOUS, -1, 0); + get = + (int *)mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANONYMOUS, -1, 0); + set = + (int *)mmap(NULL, sizeof(int), PROT_READ | PROT_WRITE, + MAP_SHARED | MAP_ANONYMOUS, -1, 0); + *sum = 0; + *get = 0; + *set = 0; + + fullid = semget(IPC_PRIVATE, 1, IPC_CREAT | 00666); + emptyid = semget(IPC_PRIVATE, 1, IPC_CREAT | 00666); + mutxid = semget(IPC_PRIVATE, 1, IPC_CREAT | 00666); + + arg.val = 0; + if (semctl(fullid, 0, SETVAL, arg) == -1) + perror("semctl setval error"); + + arg.val = MAXSEM; + if (semctl(emptyid, 0, SETVAL, arg) == -1) + perror("semctl setval error"); + + arg.val = 1; + if (semctl(mutxid, 0, SETVAL, arg) == -1) + perror("setctl setval error"); + + V.sem_num = 0; + V.sem_op = 1; + V.sem_flg = SEM_UNDO; + P.sem_num = 0; + P.sem_op = -1; + P.sem_flg = SEM_UNDO; + + i = 0; + while (i < 5) { + + semop(emptyid, &P, 1); + semop(mutxid, &P, 1); + + array[*(set) % MAXSEM] = i + 1; + printf("Producer %d\n", array[(*set) % MAXSEM]); + (*set)++; + fflush(NULL); + semop(mutxid, &V, 1); + semop(fullid, &V, 1); + i++; + } + semctl(fullid, 0, IPC_RMID); + semctl(emptyid, 0, IPC_RMID); + semctl(mutxid, 0, IPC_RMID); + + if ((pid = fork()) == 0) { + for (i = 0; i < THREAD_NUM; i++) { + ai[i] = i; + ret_a = pthread_create(&tid_a, NULL, thread_handle_a, &ai[i]); + printf("thread a : \n"); + + if (ret_a == 0) { + pthread_detach(tid_a); + } + } + } else if (pid > 0) { + for (i = 0; i < THREAD_NUM; i++) { + ai[i] = i; + ret_a = pthread_create(&tid_a, NULL, thread_handle_a, &ai[i]); + printf("thread a : \n"); + + if (ret_a == 0) { + pthread_detach(tid_a); + } + } + } else { + printf("fork error\n"); + } + + fflush(NULL); + write(1, "BEFORE_ERROR\n", 13); + //trigger_error(); + raise(SIGFPE); + write(1, "EXIT_FLAG\n", 10); + return 10; +} + +void *thread_handle_a(void *t) +{ + long page_size = MALLOC_LEN; + int j = *(int *)t; + char *addr; + addr = (char *)malloc(page_size); + if (addr != NULL) { + sprintf(addr, "hello"); + printf("(a) malloc %d success: %s\n", j, addr); + } else { + printf("(a)malloc %d failed\n", j); + } + + printf("thread (a) will exit\n"); + fflush(NULL); + return NULL; +} + diff --git a/tests/Sanity/random-apps/test1.c b/tests/Sanity/random-apps/test1.c new file mode 100644 index 0000000..45a43af --- /dev/null +++ b/tests/Sanity/random-apps/test1.c @@ -0,0 +1,52 @@ +#include +#include +#include +#include +#include + +int main(int argc, char *argv[]) +{ + int pfd[2]; + pid_t pid = -1; + int rc = 0; + char buf[BUFSIZ]; + sigset_t sig_mask; + + /* + * Mask of SIGTRAP + * Initialize of the value of sig_mask + */ + sigemptyset(&sig_mask); + + /* Set of SIGTRAP in sig_mask */ + sigaddset(&sig_mask, SIGTRAP); + + /* Set of SIGTRAP */ + sigprocmask(SIG_SETMASK, &sig_mask, NULL); + + rc = pipe(pfd); + if(rc == -1){ + perror("pipe Error\n"); + exit (1); + } + pid = fork(); + if (pid == -1){ + perror("Fork Error\n"); + exit (1); + } else if (pid == 0) { + close(pfd[0]); + close(1); + dup(pfd[1]); + close(pfd[1]); + execl("./test2.sh", (char *)0); + exit(0); + } else { + close(pfd[1]); + while((read(pfd[0], buf, sizeof(buf))) > 0) { + printf("%s", buf); + } + close(pfd[0]); + wait(NULL); + exit(0); + } +} diff --git a/tests/Sanity/random-apps/test_fork.c b/tests/Sanity/random-apps/test_fork.c new file mode 100644 index 0000000..7afd110 --- /dev/null +++ b/tests/Sanity/random-apps/test_fork.c @@ -0,0 +1,78 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#define DEFAULT_NUM 0 +#define THREAD_NUM 3 +#define MALLOC_LEN 1024*1024*10 + +void *thread_handle_a(void *t) +{ + long page_size = MALLOC_LEN; + int j = *(int *)t; + char *ptr; + char *addr; + + struct stat buf; + addr = (char *)malloc(page_size); + if (addr != NULL) { + sprintf(addr, "hello"); + printf("(a) malloc %d success: %s\n", j, addr); + } else { + printf("(a)malloc %d failed\n", j); + } + + + printf("thread (a) will exit\n"); + fflush(NULL); + if(addr != NULL) + free(addr); + return NULL; +} + +int main() +{ + int i = 0; + pid_t pid; + pthread_t tid_a; + int ai[THREAD_NUM]; + int ret_a = -1; + +#ifdef STS_SLEEP + sleep(10); +#endif + + if ((pid = fork()) == 0) { + for (i = 0; i < THREAD_NUM; i++) { + ai[i] = i; + ret_a = pthread_create(&tid_a, NULL, thread_handle_a, &ai[i]); + printf("thread a : \n"); + + if (ret_a == 0) { + pthread_detach(tid_a); + } + } + } else if (pid > 0) { + for (i = 0; i < THREAD_NUM; i++) { + ai[i] = i; + ret_a = pthread_create(&tid_a, NULL, thread_handle_a, &ai[i]); + printf("thread a : \n"); + + if (ret_a == 0) { + pthread_detach(tid_a); + } + } + + waitpid(pid, NULL, 0); + fflush(NULL); + write(1, "EXIT_FLAG\n", 10); + } else { + printf("fork error\n"); + } + return 0; +} diff --git a/tests/Sanity/random-apps/test_select.c b/tests/Sanity/random-apps/test_select.c new file mode 100644 index 0000000..f13df3b --- /dev/null +++ b/tests/Sanity/random-apps/test_select.c @@ -0,0 +1,70 @@ +#include +#include +#include +#include +#include +#include +#include + +#define MAXBUF 1024 +#define THREAD_NUM 100 +#define MALLOC_LEN 1024*1024*10 + +void *thread_handle_a(void *t) +{ + long page_size = MALLOC_LEN; + int j = *(int *)t; + char *addr; + addr = (char *)malloc(page_size); + if (addr != NULL) { + sprintf(addr, "hello"); + printf("(a) malloc %d success: %s\n", j, addr); + } else { + printf("(a)malloc %d failed\n", j); + } + + printf("thread (a) will exit\n"); + fflush(NULL); + return NULL; +} + +int main(int argc, char **argv) +{ + fd_set wfds; + struct timeval tv; + int retval, maxfd = -1; + pthread_t tid_a; + int i; + int ai[THREAD_NUM]; + int ret_a = -1; + + sleep(5); + + for (i = 0; i < THREAD_NUM; i++) { + ai[i] = i; + ret_a = pthread_create(&tid_a, NULL, thread_handle_a, &ai[i]); + printf("thread a : \n"); + + if (ret_a == 0) { + pthread_detach(tid_a); + } + } + + FD_ZERO(&wfds); + FD_SET(STDOUT_FILENO, &wfds); + maxfd = STDOUT_FILENO; + tv.tv_sec = 1; + tv.tv_usec = 0; + + retval = select(maxfd+1, NULL, &wfds, NULL, &tv); + if (retval == -1) { + fprintf(stderr, "select failed\n"); + } else if (retval == 0){ + printf("Time out\n"); + } else { + printf("stdout can be write\n"); + } + + printf("EXIT_FLAG\n"); + return 0; +} diff --git a/tests/Sanity/random-apps/thread-test2.c b/tests/Sanity/random-apps/thread-test2.c new file mode 100644 index 0000000..cce490c --- /dev/null +++ b/tests/Sanity/random-apps/thread-test2.c @@ -0,0 +1,34 @@ +#include +#include +#include +#include +#include +#include + +#define THREAD_NUM 32 + +void *thread_function (void *); + +int main (int argc, char *argv[]) +{ + int i =0, x = 0; + int res = 0; + pthread_t a_thread[THREAD_NUM]; + void *thread_result; + + for (i = 0; i < THREAD_NUM; i++) { + res = pthread_create (&a_thread[i], NULL, thread_function, (void *)0); + if (res != 0) { + printf("Thread create failed\n"); + return (10); + } + } + raise(SIGABRT); + return (0); +} + +void *thread_function (void *arg) +{ + sleep(1); + printf("Thread TEST\n"); +} diff --git a/tests/Sanity/random-apps/vfork.c b/tests/Sanity/random-apps/vfork.c new file mode 100644 index 0000000..a34e09f --- /dev/null +++ b/tests/Sanity/random-apps/vfork.c @@ -0,0 +1,15 @@ +#define _GNU_SOURCE +#include +#include + +int main (void) +{ + pid_t child = vfork (); + + /* PRINTF/SLEEP violate the VFORK operations restriction. */ + printf ("%d pid=%d\n", (int) child, (int) getpid ()); + sleep (1); + if (!child) + execlp ("/bin/true", "/bin/true", NULL); + return 0; +} From 0e4ab8cfe4ce8633a67069a72649300583a615da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Fri, 9 Jul 2021 16:36:36 +0200 Subject: [PATCH 078/100] Import RHEL's wrapper for the upstream test suite Note: In RHEL, it's "testsuite2" outside of categories, here I'm adding it to the Sanity category. Note: I've filed https://bugzilla.redhat.com/show_bug.cgi?id=1963110 and included it as a known failure to make this test pass. --- tests/Sanity/testsuite/Makefile | 71 +++++++++++++++++++++++++++ tests/Sanity/testsuite/PURPOSE | 3 ++ tests/Sanity/testsuite/main.fmf | 23 +++++++++ tests/Sanity/testsuite/runtest.sh | 79 +++++++++++++++++++++++++++++++ 4 files changed, 176 insertions(+) create mode 100644 tests/Sanity/testsuite/Makefile create mode 100644 tests/Sanity/testsuite/PURPOSE create mode 100644 tests/Sanity/testsuite/main.fmf create mode 100755 tests/Sanity/testsuite/runtest.sh diff --git a/tests/Sanity/testsuite/Makefile b/tests/Sanity/testsuite/Makefile new file mode 100644 index 0000000..fec9913 --- /dev/null +++ b/tests/Sanity/testsuite/Makefile @@ -0,0 +1,71 @@ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Makefile of /tools/ltrace/Sanity/testsuite +# Description: upstream tests for ltrace +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +export TEST=/tools/ltrace/Sanity/testsuite +export TESTVERSION=1.0 + +BUILT_FILES= + +FILES=$(METADATA) runtest.sh Makefile PURPOSE + +.PHONY: all install download clean + +run: $(FILES) build + ./runtest.sh + +build: $(BUILT_FILES) + test -x runtest.sh || chmod a+x runtest.sh + +clean: + rm -f *~ $(BUILT_FILES) + + +include /usr/share/rhts/lib/rhts-make.include + +$(METADATA): Makefile + @echo "Owner: Martin Cermak " > $(METADATA) + @echo "Name: $(TEST)" >> $(METADATA) + @echo "TestVersion: $(TESTVERSION)" >> $(METADATA) + @echo "Path: $(TEST_DIR)" >> $(METADATA) + @echo "Description: upstream tests for ltrace" >> $(METADATA) + @echo "Type: Regression" >> $(METADATA) + @echo "TestTime: 5h" >> $(METADATA) + @echo "RunFor: ltrace" >> $(METADATA) + @echo "Requires: ltrace" >> $(METADATA) + @echo "Requires: gcc" >> $(METADATA) + @echo "Requires: gcc-c++" >> $(METADATA) + @echo "Requires: libstdc++" >> $(METADATA) + @echo "Requires: libstdc++-devel" >> $(METADATA) + @echo "Requires: rpm-build yum-utils" >> $(METADATA) + @echo "Requires: elfutils-devel" >> $(METADATA) + @echo "Requires: dejagnu" >> $(METADATA) + @echo "Requires: libselinux-devel" >> $(METADATA) + @echo "Requires: libtool" >> $(METADATA) + @echo "Priority: Normal" >> $(METADATA) + @echo "License: GPLv2+" >> $(METADATA) + @echo "Confidential: no" >> $(METADATA) + @echo "Destructive: no" >> $(METADATA) + + rhts-lint $(METADATA) diff --git a/tests/Sanity/testsuite/PURPOSE b/tests/Sanity/testsuite/PURPOSE new file mode 100644 index 0000000..75f0067 --- /dev/null +++ b/tests/Sanity/testsuite/PURPOSE @@ -0,0 +1,3 @@ +PURPOSE of /tools/ltrace/Sanity/testsuite +Description: upstream tests for ltrace +Author: Martin Cermak diff --git a/tests/Sanity/testsuite/main.fmf b/tests/Sanity/testsuite/main.fmf new file mode 100644 index 0000000..c0c9e11 --- /dev/null +++ b/tests/Sanity/testsuite/main.fmf @@ -0,0 +1,23 @@ +summary: upstream tests for ltrace +description: '' +contact: Martin Cermak +component: +- ltrace +test: ./runtest.sh +framework: beakerlib +recommend: +- ltrace +- gcc +- gcc-c++ +- libstdc++ +- libstdc++-devel +- rpm-build +- yum-utils +- elfutils-devel +- dejagnu +- libselinux-devel +- libtool +- koji +duration: 5h +extra-summary: /tools/ltrace/Sanity/testsuite +extra-task: /tools/ltrace/Sanity/testsuite diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh new file mode 100755 index 0000000..e11c162 --- /dev/null +++ b/tests/Sanity/testsuite/runtest.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# vim: dict=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# runtest.sh of /tools/ltrace/Sanity/testsuite +# Description: upstream tests for ltrace +# Author: Martin Cermak +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# +# Copyright (c) 2015 Red Hat, Inc. +# +# This program is free software: you can redistribute it and/or +# modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 2 of +# the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be +# useful, but WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR +# PURPOSE. See the GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see http://www.gnu.org/licenses/. +# +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# Include Beaker environment +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +CMD='ltrace' +BIN=$(which --skip-alias $CMD) +PACKAGE="${PACKAGE:-$(rpm -qf $BIN)}" +export PACKAGE + +GCC=${GCC:-gcc} +export GCC + +rlJournalStart + rlPhaseStartSetup + rlAssertRpm $PACKAGE + rlRun -l "rpm -qf $(which $GCC)" 0 "Checking gcc rpm version" + rlRun "TMP=`mktemp -d`" + rlRun "pushd $TMP" + + rlRun "koji download-build --arch=src $PACKAGE" + rlRun "dnf builddep -y *src.rpm" + rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm" + rlRun "${RPMBUILD_GCC:+CC=$RPMBUILD_GCC} rpmbuild --define='_topdir $TMP' -bc SPECS/${CMD}.spec" + rlPhaseEnd + + rlPhaseStartTest + rlRun "pushd BUILD/${CMD}-*" + + # known issues to be ignored + ignore_list='' + rlRun "ignore_list+=' system_calls.exp'" 0 "Failure reported bz#1963110" + + # define --ignore parameter for 'make check' if there is any testcase to be ignored + [ -n "$ignore_list" ] && rlRun "ignore_param=\"--ignore '$ignore_list'\"" 0 "Ignored testcases that will not be run: $ignore_list" + + # test + set -o pipefail + rlRun "make check RUNTESTFLAGS=\"--tool_exec=$BIN CC_FOR_TARGET=$GCC $ignore_param\" |& tee $TMP/check.log" + rlRun "popd" + + # no unexpected results should appear + rlRun -l "grep '^FAIL:' check.log" 1 + rlRun -l "grep '^# of unexpected' check.log" 1 + + rlFileSubmit "$TMP/check.log" "$PACKAGE-check.log" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $TMP" + rlPhaseEnd +rlJournalPrintText +rlJournalEnd From 809fa26deb9989363b3a127ce4d1fad03a45ab0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Fri, 24 Sep 2021 13:12:50 +0200 Subject: [PATCH 079/100] Fix the setup in tests/Sanity/testsuite "koji download-build" is a wrong tool to download artifacts being tested. They are freshly scratch-built and hosted in a local repo called "test-artifacts" unknown to koji. Using "dnf download" directly and limited to that specific repo is a correct way to reach them. I'm adding a fallback using the repo's local files just in case "dnf" suffers some temporary hiccup. --- tests/Sanity/testsuite/runtest.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh index e11c162..7687113 100755 --- a/tests/Sanity/testsuite/runtest.sh +++ b/tests/Sanity/testsuite/runtest.sh @@ -40,12 +40,13 @@ rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE rlRun -l "rpm -qf $(which $GCC)" 0 "Checking gcc rpm version" + rlRun "NVR=$(rpm -q --qf='%{NAME}-%{VERSION}-%{RELEASE}' $PACKAGE)" rlRun "TMP=`mktemp -d`" rlRun "pushd $TMP" - rlRun "koji download-build --arch=src $PACKAGE" - rlRun "dnf builddep -y *src.rpm" - rlRun "rpm --define='_topdir $TMP' -Uvh *src.rpm" + rlRun "dnf download --disablerepo='*' --enablerepo=test-artifacts --source $NVR || cp /var/share/test-artifacts/$NVR.src.rpm ." + rlRun "dnf builddep -y $NVR.src.rpm" + rlRun "rpm --define='_topdir $TMP' -Uvh $NVR.src.rpm" rlRun "${RPMBUILD_GCC:+CC=$RPMBUILD_GCC} rpmbuild --define='_topdir $TMP' -bc SPECS/${CMD}.spec" rlPhaseEnd From 8fd295b7c55344a039cdb3c253e1c8b4e2e5b871 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Thu, 11 Nov 2021 12:34:11 +0100 Subject: [PATCH 080/100] Do not try to install compat arch requirements --- .../bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf index a78d993..f45f827 100644 --- a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf @@ -10,12 +10,8 @@ framework: beakerlib recommend: - ltrace - gcc -- libgcc.i686 -- glibc-devel.i686 -- libgcc.ppc64 -- glibc-devel.ppc64 -- libgcc.s390 -- glibc-devel.s390 +- libgcc +- glibc-devel duration: 5m link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=868281 From 101cd9b6c3c8e02ef3a51e53769683c895724451 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Fri, 12 Nov 2021 09:09:08 +0100 Subject: [PATCH 081/100] CI testing: Fix the SRPM download Usually, this test is used for gating ltrace. In such case the Fedora infrastructure offers the SRPM along with other ltrace subrpms within a repo called "test-artifacts". However, this test is also used to test dejagnu, because ltrace has dejagnu based testsuite. In such case the "test-artifacts" repo has dejagnu, but not ltrace. We need to be able to get the ltrace SRPM in both cases. --- tests/Sanity/testsuite/runtest.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh index 7687113..d3b2e4a 100755 --- a/tests/Sanity/testsuite/runtest.sh +++ b/tests/Sanity/testsuite/runtest.sh @@ -44,7 +44,12 @@ rlJournalStart rlRun "TMP=`mktemp -d`" rlRun "pushd $TMP" - rlRun "dnf download --disablerepo='*' --enablerepo=test-artifacts --source $NVR || cp /var/share/test-artifacts/$NVR.src.rpm ." + set -x + dnf download --disablerepo='*' --enablerepo=test-artifacts --source $NVR || \ + cp /var/share/test-artifacts/$NVR.src.rpm . || \ + rlFetchSrcForInstalled ltrace + set +x + rlRun "dnf builddep -y $NVR.src.rpm" rlRun "rpm --define='_topdir $TMP' -Uvh $NVR.src.rpm" rlRun "${RPMBUILD_GCC:+CC=$RPMBUILD_GCC} rpmbuild --define='_topdir $TMP' -bc SPECS/${CMD}.spec" From 464fde80d5f517254f636da3d73d8f535feeddb2 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jan 2022 18:10:39 +0000 Subject: [PATCH 082/100] - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 67a4ff8..d27d700 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 42%{?dist} +Release: 43%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -207,6 +207,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jan 20 2022 Fedora Release Engineering - 0.7.91-43 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + * Thu Jul 22 2021 Fedora Release Engineering - 0.7.91-42 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild From 8b45d8ed688aa9bdda4ba53f84931a6d2550d6ea Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Thu, 27 Jan 2022 23:12:51 -0500 Subject: [PATCH 083/100] Fix use-after-free in ppc64le's plt.c Found by gcc 12 Resolves: #2046722 --- ltrace-0.7.91-W-use-after-free.patch | 13 +++++++++++++ ltrace.spec | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 ltrace-0.7.91-W-use-after-free.patch diff --git a/ltrace-0.7.91-W-use-after-free.patch b/ltrace-0.7.91-W-use-after-free.patch new file mode 100644 index 0000000..19e802f --- /dev/null +++ b/ltrace-0.7.91-W-use-after-free.patch @@ -0,0 +1,13 @@ +diff -rup a/sysdeps/linux-gnu/ppc/plt.c b/sysdeps/linux-gnu/ppc/plt.c +--- a/sysdeps/linux-gnu/ppc/plt.c 2022-01-27 20:40:52.956980433 -0500 ++++ b/sysdeps/linux-gnu/ppc/plt.c 2022-01-27 20:41:37.031599771 -0500 +@@ -687,8 +687,8 @@ arch_elf_add_func_entry(struct process * + if (libsym == NULL + || library_symbol_init(libsym, addr, full_name, 1, + LS_TOPLT_NONE) < 0) { +- free(libsym); + delete_symbol_chain(libsym); ++ free(libsym); + libsym = NULL; + fprintf(stderr, "Couldn't add symbol %s" + "for tracing.\n", name); diff --git a/ltrace.spec b/ltrace.spec index d27d700..b14e9f5 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 43%{?dist} +Release: 44%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -132,6 +132,8 @@ Patch35: ltrace-0.7.91-rh1799619.patch # Support for both SC and SCV sycall insns Patch36: ltrace-0.7.91-ppc64le-scv.patch +Patch37: ltrace-0.7.91-W-use-after-free.patch + %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -180,6 +182,7 @@ execution of processes. %patch34 -p1 %patch35 -p1 %patch36 -p1 +%patch37 -p1 %build autoreconf -i @@ -207,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jan 27 2022 DJ Delorie - 0.7.91-44 +- Fix use-after-free cases. + * Thu Jan 20 2022 Fedora Release Engineering - 0.7.91-43 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild From 16ad28b25972766f3e97b196c2193dfa22efb829 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 3 May 2022 10:03:37 -0400 Subject: [PATCH 084/100] Rebuild ltrace for rawhide (#2046722) Resolves: #2046722 --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index b14e9f5..92e9d4f 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 44%{?dist} +Release: 45%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri May 03 2022 Carlos O'Donell - 0.7.91-45 +- Rebuild ltrace for rawhide (#2046722) + * Thu Jan 27 2022 DJ Delorie - 0.7.91-44 - Fix use-after-free cases. From dcc12472127d4e2398fe875763c991abf34dbc16 Mon Sep 17 00:00:00 2001 From: Jesus Checa Hidalgo Date: Wed, 23 Feb 2022 11:49:37 +0100 Subject: [PATCH 085/100] tests: fixes for gating tests * plans/ci: setting "how: beakerlib" in execute step is deprecated. changed to "how: tmt" to comply with newer tmt versions. tmt versions. * ltrace with both --o and --c does not produce output to file: add malloc to the list of syscalls to check for tracing. * ltrace crashes when run on certain processes with --S option: make pgrep to exact match to avoid getting two PIDs, one from dbus-broker and other from dbus-broker-launch. * ltrace doesn't work on PIE-binaries: Added missing 32-bit dependencies. --- plans/ci.fmf | 2 +- .../runtest.sh | 13 ++++++++++--- .../runtest.sh | 2 +- .../main.fmf | 2 ++ 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/plans/ci.fmf b/plans/ci.fmf index 1ad2c12..85710d6 100644 --- a/plans/ci.fmf +++ b/plans/ci.fmf @@ -3,4 +3,4 @@ discover: how: fmf directory: tests execute: - how: beakerlib + how: tmt diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh index 77fbfef..bb5c85a 100755 --- a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh @@ -67,15 +67,22 @@ rlJournalStart fi # ltrace no longer reports __libc_start_main on rhel-8 x86_64 (rhbz#1654734) - if grep "ioctl" ltrace-test-sys.log; then + # search for either malloc or ioctl. + func_found=0 + for traced_func in "malloc" "ioctl"; do + if grep "$traced_func" ltrace-test-sys.log; then + func_found=1 + fi + done + if [ $func_found -ne 0 ]; then if [ $skip_system_binary_test ]; then rlLogWarning "Test was skipped but it seems ok. Review skip check." fi else if [ $skip_system_binary_test ]; then - rlLogInfo "ltrace output does not contain ioctl calls (expected failure)" + rlLogInfo "ltrace output does not contain ioctl or malloc calls (expected failure)" else - rlFail "ltrace output does not contain ioctl calls" + rlFail "ltrace output does not contain ioctl or malloc calls" fi fi diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh index 1ae4c93..1434c47 100755 --- a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh @@ -46,7 +46,7 @@ fi rlJournalStart rlPhaseStartSetup rlAssertRpm $PACKAGE - rlRun "pgrep $PROC_NAME || service $SERVICE_NAME start" 0 "Checking/starting $SERVICE_NAME" + rlRun "pgrep -x $PROC_NAME || service $SERVICE_NAME start" 0 "Checking/starting $SERVICE_NAME" rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" rlRun "pushd $TmpDir" rlPhaseEnd diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf index f45f827..bcce809 100644 --- a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/main.fmf @@ -12,6 +12,8 @@ recommend: - gcc - libgcc - glibc-devel +- libgcc.i686 +- glibc-devel.i686 duration: 5m link: - relates: https://bugzilla.redhat.com/show_bug.cgi?id=868281 From 00f430ccbebdbd13bdd4d7ee6303b091cf005542 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 21 Jul 2022 19:58:28 +0000 Subject: [PATCH 086/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 92e9d4f..6d308e2 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 45%{?dist} +Release: 46%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jul 21 2022 Fedora Release Engineering - 0.7.91-46 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + * Fri May 03 2022 Carlos O'Donell - 0.7.91-45 - Rebuild ltrace for rawhide (#2046722) From 3abe3265ff07259553d32fa04a65ef3c12b54c25 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 19 Jan 2023 18:23:03 +0000 Subject: [PATCH 087/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 6d308e2..7c82041 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 46%{?dist} +Release: 47%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jan 19 2023 Fedora Release Engineering - 0.7.91-47 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + * Thu Jul 21 2022 Fedora Release Engineering - 0.7.91-46 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild From cbc633d2a20d8b19bec13d89ae7921326b665266 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 20 Jul 2023 13:08:56 +0000 Subject: [PATCH 088/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild Signed-off-by: Fedora Release Engineering --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 7c82041..9540ad3 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 47%{?dist} +Release: 48%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jul 20 2023 Fedora Release Engineering - 0.7.91-48 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + * Thu Jan 19 2023 Fedora Release Engineering - 0.7.91-47 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild From 15ef50aff44f576100f0bf639082559dec8e7d74 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Sun, 21 Jan 2024 06:18:29 +0000 Subject: [PATCH 089/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 9540ad3..4cc9e6e 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 48%{?dist} +Release: 49%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Sun Jan 21 2024 Fedora Release Engineering - 0.7.91-49 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Thu Jul 20 2023 Fedora Release Engineering - 0.7.91-48 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild From a77340edfd6fd37e5a645c19ea65f6fdf65d6a88 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 25 Jan 2024 04:54:45 +0000 Subject: [PATCH 090/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 4cc9e6e..83a8cc2 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 49%{?dist} +Release: 50%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jan 25 2024 Fedora Release Engineering - 0.7.91-50 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + * Sun Jan 21 2024 Fedora Release Engineering - 0.7.91-49 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From 4773a704b6740f9fb1b2e3a6230943f785089832 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Such=C3=BD?= Date: Tue, 13 Feb 2024 09:30:05 +0000 Subject: [PATCH 091/100] Migrate to SPDX license This is a part of https://fedoraproject.org/wiki/Changes/SPDX_Licenses_Phase_3 --- ltrace.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 83a8cc2..3751071 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -5,7 +5,7 @@ Release: 50%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace -License: GPLv2+ +License: GPL-2.0-or-later BuildRequires: elfutils-devel dejagnu BuildRequires: libselinux-devel From 6444af4152054d2f4048b89e912027a0121e03ad Mon Sep 17 00:00:00 2001 From: Software Management Team Date: Thu, 30 May 2024 12:46:47 +0200 Subject: [PATCH 092/100] Eliminate use of obsolete %patchN syntax (#2283636) --- ltrace.spec | 74 ++++++++++++++++++++++++++--------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/ltrace.spec b/ltrace.spec index 3751071..fae9c6f 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -146,43 +146,43 @@ execution of processes. %prep %setup -q -n %{name}-%{version} -%patch0 -p1 -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 -%patch5 -p1 -%patch6 -p1 -%patch7 -p1 -%patch8 -p1 -%patch9 -p1 -%patch10 -p1 -%patch11 -p1 -%patch13 -p1 -%patch14 -p1 -%patch15 -p1 -%patch16 -p1 -%patch17 -p1 -%patch18 -p1 -%patch19 -p1 -%patch20 -p1 -%patch21 -p1 -%patch22 -p1 -%patch23 -p1 -%patch24 -p1 -%patch25 -p1 -%patch26 -p1 -%patch27 -p1 -%patch28 -p1 -%patch29 -p1 -%patch30 -p1 -%patch31 -p1 -%patch32 -p1 -%patch33 -p1 -%patch34 -p1 -%patch35 -p1 -%patch36 -p1 -%patch37 -p1 +%patch -P0 -p1 +%patch -P1 -p1 +%patch -P2 -p1 +%patch -P3 -p1 +%patch -P4 -p1 +%patch -P5 -p1 +%patch -P6 -p1 +%patch -P7 -p1 +%patch -P8 -p1 +%patch -P9 -p1 +%patch -P10 -p1 +%patch -P11 -p1 +%patch -P13 -p1 +%patch -P14 -p1 +%patch -P15 -p1 +%patch -P16 -p1 +%patch -P17 -p1 +%patch -P18 -p1 +%patch -P19 -p1 +%patch -P20 -p1 +%patch -P21 -p1 +%patch -P22 -p1 +%patch -P23 -p1 +%patch -P24 -p1 +%patch -P25 -p1 +%patch -P26 -p1 +%patch -P27 -p1 +%patch -P28 -p1 +%patch -P29 -p1 +%patch -P30 -p1 +%patch -P31 -p1 +%patch -P32 -p1 +%patch -P33 -p1 +%patch -P34 -p1 +%patch -P35 -p1 +%patch -P36 -p1 +%patch -P37 -p1 %build autoreconf -i From 941e708eb6996913807027f6f37eb89f108d5a60 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 18 Jul 2024 16:05:46 +0000 Subject: [PATCH 093/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index fae9c6f..50baa0b 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 50%{?dist} +Release: 51%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jul 18 2024 Fedora Release Engineering - 0.7.91-51 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + * Thu Jan 25 2024 Fedora Release Engineering - 0.7.91-50 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild From d70730248fcd8d00fc29924415dab5bf3dc541bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Kadl=C4=8D=C3=ADk?= Date: Wed, 18 Sep 2024 14:16:14 +0200 Subject: [PATCH 094/100] Fix gating tests on Rawhide --- tests/Sanity/testsuite/runtest.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/Sanity/testsuite/runtest.sh b/tests/Sanity/testsuite/runtest.sh index d3b2e4a..3f56a91 100755 --- a/tests/Sanity/testsuite/runtest.sh +++ b/tests/Sanity/testsuite/runtest.sh @@ -53,10 +53,16 @@ rlJournalStart rlRun "dnf builddep -y $NVR.src.rpm" rlRun "rpm --define='_topdir $TMP' -Uvh $NVR.src.rpm" rlRun "${RPMBUILD_GCC:+CC=$RPMBUILD_GCC} rpmbuild --define='_topdir $TMP' -bc SPECS/${CMD}.spec" + + MAKEFILE_PATH=$(ls BUILD/${CMD}-*/Makefile 2>/dev/null) + if [[ -z "$MAKEFILE_PATH" ]]; then + MAKEFILE_PATH=$(ls BUILD/${CMD}-*/${CMD}-*/Makefile 2>/dev/null) + fi + rlLogInfo "MAKEFILE_PATH=$MAKEFILE_PATH" rlPhaseEnd rlPhaseStartTest - rlRun "pushd BUILD/${CMD}-*" + rlRun "pushd ${MAKEFILE_PATH%/Makefile}" # known issues to be ignored ignore_list='' From 665a435b81ba15ce0824e1fe16a744e667c4d831 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Mon, 11 Nov 2024 12:48:52 +0100 Subject: [PATCH 095/100] tests: fix for rhel10 We use tests in Fedora for RHEL testing as well and some of the tests need to be updated to compile and run successfully on RHEL-10. * tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option: add missing includes, add NULL arg to wait() * tests/Regression/211163-ltrace-with--c-omit-execl-call: fix IF condition to include rhel-10 * tests/Regression/427444-ltrace-crashes-process-to-be-analysed: add missing include * tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file: moved reproducer to a separate file, add missing include, fix IF condition to include rhel-10 * tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots: add missing include * tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option: fix IF condition to include rhel-10 * tests/Sanity/random-apps: add return type and return to main function, add missing includes, add semun union definition --- .../reproducer.c | 4 +++- .../211163-ltrace-with--c-omit-execl-call/runtest.sh | 4 ++-- .../reproducer.c | 1 + .../Makefile | 2 +- .../reproducer.c | 7 +++++++ .../runtest.sh | 7 ++++--- .../runtest.sh | 1 + .../runtest.sh | 2 +- tests/Sanity/random-apps/mthd2.c | 3 ++- tests/Sanity/random-apps/reproducer.c | 1 + tests/Sanity/random-apps/reproducer3.c | 1 + tests/Sanity/random-apps/t_thread.c | 11 ++++++++++- tests/Sanity/random-apps/test_select.c | 1 + 13 files changed, 35 insertions(+), 10 deletions(-) create mode 100644 tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/reproducer.c diff --git a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c index 1d11ad6..f06a96b 100644 --- a/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c +++ b/tests/Regression/211135-ltrace-hangs-while-tracing-child-process-with--f-option/reproducer.c @@ -8,6 +8,8 @@ #include #include +#include +#include void child() { printf("Fork Child\n"); @@ -24,7 +26,7 @@ int main() { child(); else { printf("My child pid is %d\n",pid); - wait(); + wait(NULL); } return 0; } diff --git a/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh b/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh index 68b0814..a4de38c 100755 --- a/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh +++ b/tests/Regression/211163-ltrace-with--c-omit-execl-call/runtest.sh @@ -55,8 +55,8 @@ rlJournalStart fi ;; esac - elif rlIsRHEL 9 && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then - rlLogWarning "RHEL-9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking" + elif rlIsRHEL ">=9" && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL >=9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking" skip_test=1 elif rlIsFedora 33 && [ "$(arch)" = "ppc64le" ]; then rlLogWarning "FC33 ltrace fails to trace system binaries on ppc64le due to bz#1902770, hence skipping failure checking" diff --git a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c index d0ccb5d..3118c8e 100644 --- a/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c +++ b/tests/Regression/427444-ltrace-crashes-process-to-be-analysed/reproducer.c @@ -3,6 +3,7 @@ #include #include #include +#include #ifndef NI_MAXHOST diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile index 4b68558..49c119a 100644 --- a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/Makefile @@ -25,7 +25,7 @@ export TESTVERSION=1.0 BUILT_FILES= -FILES=$(METADATA) runtest.sh Makefile PURPOSE +FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c .PHONY: all install download clean diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/reproducer.c b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/reproducer.c new file mode 100644 index 0000000..5107daa --- /dev/null +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/reproducer.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + alarm(42); + return 0; +} diff --git a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh index bb5c85a..9e6c769 100755 --- a/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh +++ b/tests/Regression/447404-ltrace-with-both--o-and--c-options-does-not-produce-output-to-file/runtest.sh @@ -28,11 +28,12 @@ rlJournalStart rlAssertRpm $(rpm -qf $(which gcc)) rlShowRunningKernel rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "cp reproducer.c $TmpDir" rlRun "pushd $TmpDir" rlPhaseEnd rlPhaseStartTest "ltrace with -o and -c options tracing testing binary" - rlRun "echo 'int main(){alarm(42);return 0;}'| gcc -x c -o test.bin -" + rlRun "gcc -x c -o test.bin reproducer.c" rlRun "ltrace -o ltrace-test.log -c ./test.bin" 0 "ltrace is crunching a testing binary" rlRun -l "cat ltrace-test.log" rlAssertGrep "alarm" ltrace-test.log @@ -58,8 +59,8 @@ rlJournalStart fi ;; esac - elif rlIsRHEL 9 && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then - rlLogWarning "RHEL-9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking" + elif rlIsRHEL ">=9" && [[ $PACKAGE =~ ^ltrace ]] && [ "$(arch)" = "ppc64le" ]; then + rlLogWarning "RHEL >=9 ltrace fails to trace system binaries on ppc64le due to bz#1906881, hence skipping failure checking" skip_system_binary_test=1 elif rlIsFedora 33 && [ "$(arch)" = "ppc64le" ]; then rlLogWarning "FC33 ltrace fails to trace system binaries on ppc64le due to bz#1902770, hence skipping failure checking" diff --git a/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh index 9758773..2dd3bb1 100755 --- a/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh +++ b/tests/Regression/bz1158713-ltrace-assigns-wrong-names-to-glibc-PLT-slots/runtest.sh @@ -42,6 +42,7 @@ rlJournalStart #include #include #include +#include int main() { diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh index 1434c47..44d3028 100755 --- a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh @@ -32,7 +32,7 @@ CMD='ltrace' BIN=$(which --skip-alias $CMD) PACKAGE="${PACKAGE:-$(rpm -qf --qf='%{name}\n' $BIN)}" -if rlIsRHEL 9 || rlIsFedora; then +if rlIsRHEL ">=9" || rlIsFedora; then PROC_NAME=dbus-broker SERVICE_NAME=dbus-broker elif rlIsRHEL 6; then diff --git a/tests/Sanity/random-apps/mthd2.c b/tests/Sanity/random-apps/mthd2.c index 6c0f154..9ef8a41 100644 --- a/tests/Sanity/random-apps/mthd2.c +++ b/tests/Sanity/random-apps/mthd2.c @@ -28,7 +28,7 @@ void *sub_thd(void *c) sub_func(); } -main(int argc, char *argv[]) +int main(int argc, char *argv[]) { int i; pthread_t thd[NTHD]; @@ -39,5 +39,6 @@ main(int argc, char *argv[]) pthread_create(&thd[i], NULL, sub_thd, NULL); } // pause(); + return 0; } diff --git a/tests/Sanity/random-apps/reproducer.c b/tests/Sanity/random-apps/reproducer.c index cca818c..c5df5d9 100644 --- a/tests/Sanity/random-apps/reproducer.c +++ b/tests/Sanity/random-apps/reproducer.c @@ -1,4 +1,5 @@ #include +#include void *start (void *arg) { return arg; diff --git a/tests/Sanity/random-apps/reproducer3.c b/tests/Sanity/random-apps/reproducer3.c index cca818c..c5df5d9 100644 --- a/tests/Sanity/random-apps/reproducer3.c +++ b/tests/Sanity/random-apps/reproducer3.c @@ -1,4 +1,5 @@ #include +#include void *start (void *arg) { return arg; diff --git a/tests/Sanity/random-apps/t_thread.c b/tests/Sanity/random-apps/t_thread.c index e1f24c3..d024f07 100644 --- a/tests/Sanity/random-apps/t_thread.c +++ b/tests/Sanity/random-apps/t_thread.c @@ -1,10 +1,11 @@ #include #include -#include +#include #include #include #include #include +#include #include //#include "trigger_error.h" #define THREAD_NUM 100 @@ -17,6 +18,14 @@ int fullid; int emptyid; int mutxid; +union semun +{ + int val; /* Value for SETVAL */ + struct semid_ds *buf; /* Buffer for IPC_STAT, IPC_SET */ + unsigned short *array; /* Array for GETALL, SETALL */ + struct seminfo *__buf; /* Buffer for IPC_INFO (Linux-specific) */ +}; + void *thread_handle_a(void *temp); int main(int argc, char *argv[]) diff --git a/tests/Sanity/random-apps/test_select.c b/tests/Sanity/random-apps/test_select.c index f13df3b..0ad3c34 100644 --- a/tests/Sanity/random-apps/test_select.c +++ b/tests/Sanity/random-apps/test_select.c @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include From 4b0ed33102d96241fd237f75a60b464beb204b14 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 13 Nov 2024 10:42:54 +0100 Subject: [PATCH 096/100] tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries: fix for rhel10 * disable 32b part of the test for rhel10 * fix getting ARCH/SARCH * move reproducer to a separate file, add missing include --- .../Makefile | 2 +- .../reproducer.c | 7 +++++++ .../runtest.sh | 13 +++++++++---- 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/reproducer.c diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile index 4f22633..65e57b3 100644 --- a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/Makefile @@ -29,7 +29,7 @@ export TESTVERSION=1.0 BUILT_FILES= -FILES=$(METADATA) runtest.sh Makefile PURPOSE +FILES=$(METADATA) runtest.sh Makefile PURPOSE reproducer.c .PHONY: all install download clean diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/reproducer.c b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/reproducer.c new file mode 100644 index 0000000..5107daa --- /dev/null +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/reproducer.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + alarm(42); + return 0; +} diff --git a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh index 714dfc4..586a0c6 100755 --- a/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh +++ b/tests/Regression/bz868281-ltrace-doesn-t-work-on-PIE-binaries/runtest.sh @@ -39,14 +39,16 @@ rlJournalStart rlAssertRpm $LTRACE_RPM rlAssertRpm $GCC_RPM rlAssertRpm $BINUTILS_RPM - for arch in $(rlGetPrimaryArch) $(rlGetSecondaryArch); do + ARCH="$(rlGetPrimaryArch)" + SARCH="$(rlGetSecondaryArch)" + for arch in $ARCH $SARCH; do rlCheckRpm glibc.$arch done rlRun "TmpDir=\$(mktemp -d)" 0 "Creating tmp directory" + rlRun "cp reproducer.c $TmpDir" rlRun "pushd $TmpDir" if [ -d /usr/lib64 ]; then - ARCH=`uname -i` if [[ $ARCH =~ s390.* ]]; then if rlIsRHEL '>=8'; then rlLogInfo "RHEL-8 and newer do not support s390x 31-bit compilation" @@ -62,6 +64,9 @@ rlJournalStart elif [[ $ARCH =~ ia64|aarch64|ppc64le ]]; then rlLogInfo "$ARCH does not support 32-bit compilation" MBITS= + elif rlIsRHEL ">=10"; then + rlLogInfo "RHEL >=10 does not support 32-bit packages" + MBITS= else MBITS=32 fi @@ -69,11 +74,11 @@ rlJournalStart rlLogInfo "MBITS=$MBITS" - rlRun "echo 'int main(){alarm(42);return 0;}'| $GCC -fPIE -pie -x c -o a-native.out -" + rlRun "$GCC -fPIE -pie -x c reproducer.c -o a-native.out" rlAssertExists a-native.out if [ -n "$MBITS" ]; then - rlRun "echo 'int main(){alarm(42);return 0;}'| $GCC -fPIE -pie -m$MBITS -x c -o a-$MBITS.out -" + rlRun "$GCC -fPIE -pie -m$MBITS -x c reproducer.c -o a-$MBITS.out" rlAssertExists a-$MBITS.out fi rlPhaseEnd From 287df279b5062536e9aaffae262d157104e690a3 Mon Sep 17 00:00:00 2001 From: Martin Coufal Date: Wed, 13 Nov 2024 13:32:35 +0100 Subject: [PATCH 097/100] tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option: make pidof return only one PID --- .../runtest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh index 44d3028..9c83e5e 100755 --- a/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh +++ b/tests/Regression/bz1360259-ltrace-crashes-when-run-on-certain-processes-with-the--S-option/runtest.sh @@ -52,13 +52,13 @@ rlJournalStart rlPhaseEnd rlPhaseStartTest - rlRun "PID=$(pidof $PROC_NAME)" + rlRun "PID='$(pidof -s $PROC_NAME)'" # try to ltrace dbus-daemon. If there is a bug (BZ#1360259), it will crash rlWatchdog "ltrace -S -p $PID > output.log 2>&1" 30 INT rlAssertEquals "ltrace is expected to be terminated by watchdog" 1 "$?" rlLog "output.log: $(cat output.log)" rlAssertNotGrep "\(Assertion.*failed\|Segmentation fault\)" output.log - rlAssertEquals "$PROC_NAME is expected to be still running" $PID "$(pidof $PROC_NAME)" + rlAssertEquals "$PROC_NAME is expected to be still running" $PID "$(pidof -s $PROC_NAME)" rlFileSubmit output.log rlPhaseEnd From 10f68c74442f9c689377c959e16f561a92ed4d5e Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 17 Jan 2025 16:07:24 +0000 Subject: [PATCH 098/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index 50baa0b..f4e4d9e 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 51%{?dist} +Release: 52%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Fri Jan 17 2025 Fedora Release Engineering - 0.7.91-52 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + * Thu Jul 18 2024 Fedora Release Engineering - 0.7.91-51 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild From 955c1e43d17cef57e24d373985ab6a4299e68ee6 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Thu, 24 Jul 2025 20:55:16 +0000 Subject: [PATCH 099/100] Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild --- ltrace.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ltrace.spec b/ltrace.spec index f4e4d9e..f175967 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace Version: 0.7.91 -Release: 52%{?dist} +Release: 53%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -210,6 +210,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Thu Jul 24 2025 Fedora Release Engineering - 0.7.91-53 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + * Fri Jan 17 2025 Fedora Release Engineering - 0.7.91-52 - Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild From a8c41cd3541e3c22a6348350475cd6a1bcb603df Mon Sep 17 00:00:00 2001 From: DJ Delorie Date: Tue, 16 Sep 2025 12:54:36 -0400 Subject: [PATCH 100/100] Rebase to ltrace 0.8.1 --- .gitignore | 1 + ltrace.spec | 164 ++-------------------------------------------------- sources | 2 +- 3 files changed, 8 insertions(+), 159 deletions(-) diff --git a/.gitignore b/.gitignore index 45c391d..92e00dc 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ ltrace-*/ /ltrace-0.7.0.tar.bz2 /ltrace-0.7.2.tar.bz2 /ltrace-0.7.91.tar.bz2 +/ltrace-0.8.1.tar.bz2 diff --git a/ltrace.spec b/ltrace.spec index f175967..15301a6 100644 --- a/ltrace.spec +++ b/ltrace.spec @@ -1,7 +1,7 @@ Summary: Tracks runtime library calls from dynamically linked executables Name: ltrace -Version: 0.7.91 -Release: 53%{?dist} +Version: 0.8.1 +Release: 1%{?dist} # In coordination with Juan Céspedes, upstream is now officially on gitlab. # We are going to being sending all of our Fedora patches upstream to gitlab. URL: https://gitlab.com/cespedes/ltrace @@ -13,127 +13,9 @@ BuildRequires: autoconf automake libtool BuildRequires: gcc-c++ BuildRequires: make -# Note: this URL needs to be updated for each release, as the file -# number changes for each file. Full list of released files is at: -# https://alioth.debian.org/frs/?group_id=30892 +# https://gitlab.com/cespedes/ltrace/-/releases Source: ltrace-%{version}.tar.bz2 -# Merge of several upstream commits that fixes compilation on ARM. -Patch0: ltrace-0.7.91-arm.patch - -# Upstream patch that fixes accounting of exec, __libc_start_main and -# others in -c output. -Patch1: ltrace-0.7.91-account_execl.patch - -# Upstream patch that fixes interpretation of PLT on x86_64 when -# IRELATIVE slots are present. -Patch2: ltrace-0.7.91-x86_64-irelative.patch - -# Upstream patch that fixes fetching of system call arguments on s390. -Patch3: ltrace-0.7.91-s390-fetch-syscall.patch - -# Upstream patch that enables tracing of IRELATIVE PLT slots on s390. -Patch4: ltrace-0.7.91-s390-irelative.patch - -# Fix for a regression in tracing across fork. Upstream patch. -Patch5: ltrace-0.7.91-ppc64-fork.patch - -# Fix crashing a prelinked PPC64 binary which makes PLT calls through -# slots that ltrace doesn't trace. -# https://bugzilla.redhat.com/show_bug.cgi?id=1051221 -Patch6: ltrace-0.7.91-breakpoint-on_install.patch -Patch7: ltrace-0.7.91-ppc64-unprelink.patch - -# Man page nits. Backport of an upstream patch. -Patch8: ltrace-0.7.91-man.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1044766 -Patch9: ltrace-0.7.91-cant_open.patch - -# Support Aarch64 architecture. -Patch10: ltrace-0.7.91-aarch64.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1064406 -Patch11: ltrace-0.7.2-e_machine.patch - -# Support for ppc64le, backported from upstream. -# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=eea4ad2cce289753aaa35b4e0258a76d8f8f367c -# https://bugzilla.redhat.com/show_bug.cgi?id=1131956 -Patch13: ltrace-0.7.91-ppc64le-support.patch -# 35a9677dc9dcb7909ebd28f30200474d7e8b660f, -# 437d2377119036346f4dbd93039c847b4cc9d0be, -# eb3993420734f091cde9a6053ca6b4edcf9ae334 -Patch14: ltrace-0.7.91-ppc64le-fixes.patch - -# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=2e9f9f1f5d0fb223b109429b9c904504b7f638e2 -# http://anonscm.debian.org/gitweb/?p=collab-maint/ltrace.git;a=commit;h=f96635a03b3868057db5c2d7972d5533e2068345 -Patch15: ltrace-0.7.91-parser-ws_after_id.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1171165 -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=d8f1287b85e2c2b2ae0235809e956f4365e53c45 -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=d80c5371454383e3f9978622e5578cf02af8c44c -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=bf82100966deda9c7d26ad085d97c08126a8ae88 -Patch16: ltrace-0.7.91-ppc-bias.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1158714 -Patch17: ltrace-0.7.91-x86-plt_map.patch -Patch18: ltrace-0.7.91-x86-unused_label.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1170315 -Patch19: ltrace-0.7.91-unwind-elfutils.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1208351 -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=4724bd5a4a19db117a1d280b9d1a3508fd4e03fa -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=72ee29639c55b5942bc07c8ed0013005f8fc5a97 -Patch20: ltrace-0.7.91-multithread-no-f-1.patch -Patch21: ltrace-0.7.91-multithread-no-f-2.patch - -# Fix problems with building a number of test cases. -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=694d19ff14017926454771cbb63a22355b72f1bf -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=a3a03622fb4ca9772dca13eae724a94ba1e728f4 -Patch22: ltrace-0.7.91-testsuite-includes.patch -Patch23: ltrace-0.7.91-testsuite-includes-2.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1210653 -# http://anonscm.debian.org/cgit/collab-maint/ltrace.git/commit/?id=eea6091f8672b01f7f022b0fc367e0f568225ffc -Patch24: ltrace-0.7.91-ppc64le-configure.patch - -Patch25: ltrace-rh1307754.patch - -# GCC now warns (errors) on "tautological compares", and readdir_r is deprecated. -Patch26: ltrace-0.7.91-tautology.patch - -# ARM code has unreachable code after switch statement, move initialization -Patch27: ltrace-rh1423913.patch - -# AARCH64 large parameters and syscall testsuite fixes. -Patch28: ltrace-0.7.91-aarch64-params.patch - -# gcc-9 fix. Avoid passing NULL as argument to %s -Patch29: ltrace-0.7.91-null.patch - -# Adds support for CET PLTs via second-plt lookups. -Patch30: ltrace-0.7.91-cet.patch - -# Extra #includes for gcc 9 -Patch31: ltrace-0.7.91-aarch64-headers.patch -# Testsuite: AARCH64 ifuncs not supported yet yet. -Patch32: ltrace-rh1225568.patch - -# testsuite fixes for pre-installed config files -Patch33: ltrace-0.7.91-testsuite-system_call_params.patch - -# Ignore bogus files from the environment -Patch34: ltrace-0.7.91-XDG_CONFIG_DIRS.patch - -# GCC erroneously warns about uninitialized values -Patch35: ltrace-0.7.91-rh1799619.patch - -# Support for both SC and SCV sycall insns -Patch36: ltrace-0.7.91-ppc64le-scv.patch - -Patch37: ltrace-0.7.91-W-use-after-free.patch - %description Ltrace is a debugging program which runs a specified command until the command exits. While the command is executing, ltrace intercepts and @@ -146,43 +28,6 @@ execution of processes. %prep %setup -q -n %{name}-%{version} -%patch -P0 -p1 -%patch -P1 -p1 -%patch -P2 -p1 -%patch -P3 -p1 -%patch -P4 -p1 -%patch -P5 -p1 -%patch -P6 -p1 -%patch -P7 -p1 -%patch -P8 -p1 -%patch -P9 -p1 -%patch -P10 -p1 -%patch -P11 -p1 -%patch -P13 -p1 -%patch -P14 -p1 -%patch -P15 -p1 -%patch -P16 -p1 -%patch -P17 -p1 -%patch -P18 -p1 -%patch -P19 -p1 -%patch -P20 -p1 -%patch -P21 -p1 -%patch -P22 -p1 -%patch -P23 -p1 -%patch -P24 -p1 -%patch -P25 -p1 -%patch -P26 -p1 -%patch -P27 -p1 -%patch -P28 -p1 -%patch -P29 -p1 -%patch -P30 -p1 -%patch -P31 -p1 -%patch -P32 -p1 -%patch -P33 -p1 -%patch -P34 -p1 -%patch -P35 -p1 -%patch -P36 -p1 -%patch -P37 -p1 %build autoreconf -i @@ -210,6 +55,9 @@ echo ====================TESTING END===================== %{_datadir}/ltrace %changelog +* Tue Sep 16 2025 DJ Delorie - 0.8.1-1 +- Rebased to ltrace 0.8.1 + * Thu Jul 24 2025 Fedora Release Engineering - 0.7.91-53 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild diff --git a/sources b/sources index a8420d6..1dd70e2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -9db3bdee7cf3e11c87d8cc7673d4d25b ltrace-0.7.91.tar.bz2 +SHA512 (ltrace-0.8.1.tar.bz2) = 68fdf10abb3c9534987cb4fcf2531502f8376c56299d56908406ba903fa63af2e0a82c3b902ed0cd47e4985154155a4e9387a11ada066515de26486301dddbaf