0.186-1 - Upgrade to upstream 0.186

This commit is contained in:
Mark Wielaard 2021-11-11 00:40:26 +01:00
parent 18d7a42230
commit fff536c2af
4 changed files with 33 additions and 143 deletions

1
.gitignore vendored
View File

@ -26,3 +26,4 @@
/elfutils-0.183.tar.bz2 /elfutils-0.183.tar.bz2
/elfutils-0.184.tar.bz2 /elfutils-0.184.tar.bz2
/elfutils-0.185.tar.bz2 /elfutils-0.185.tar.bz2
/elfutils-0.186.tar.bz2

View File

@ -1,125 +0,0 @@
commit 9aee0992d6e6ec4cce2c015d8da4b61022c6f6dd
Author: Mark Wielaard <mark@klomp.org>
Date: Wed Aug 4 21:01:27 2021 +0200
tests: Allow an extra pthread_kill frame in backtrace tests
glibc 2.34 calls pthread_kill from the raise function. Before raise
directly called the (tg)kill syscall. So allow pthread_kill to be the
first frame in a backtrace where raise is expected. Also change some
asserts to fprintf plus abort to make it more clear why the testcase
fails.
https://sourceware.org/bugzilla/show_bug.cgi?id=28190
Signed-off-by: Mark Wielaard <mark@klomp.org>
diff --git a/tests/backtrace.c b/tests/backtrace.c
index 36c8b8c4..afc12fb9 100644
--- a/tests/backtrace.c
+++ b/tests/backtrace.c
@@ -97,6 +97,9 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
static bool reduce_frameno = false;
if (reduce_frameno)
frameno--;
+ static bool pthread_kill_seen = false;
+ if (pthread_kill_seen)
+ frameno--;
if (! use_raise_jmp_patching && frameno >= 2)
frameno += 2;
const char *symname2 = NULL;
@@ -107,11 +110,26 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
&& (strcmp (symname, "__kernel_vsyscall") == 0
|| strcmp (symname, "__libc_do_syscall") == 0))
reduce_frameno = true;
+ else if (! pthread_kill_seen && symname
+ && strstr (symname, "pthread_kill") != NULL)
+ pthread_kill_seen = true;
else
- assert (symname && strcmp (symname, "raise") == 0);
+ {
+ if (!symname || strcmp (symname, "raise") != 0)
+ {
+ fprintf (stderr,
+ "case 0: expected symname 'raise' got '%s'\n", symname);
+ abort ();
+ }
+ }
break;
case 1:
- assert (symname != NULL && strcmp (symname, "sigusr2") == 0);
+ if (symname == NULL || strcmp (symname, "sigusr2") != 0)
+ {
+ fprintf (stderr,
+ "case 1: expected symname 'sigusr2' got '%s'\n", symname);
+ abort ();
+ }
break;
case 2: // x86_64 only
/* __restore_rt - glibc maybe does not have to have this symbol. */
@@ -120,11 +138,21 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
if (use_raise_jmp_patching)
{
/* Verify we trapped on the very first instruction of jmp. */
- assert (symname != NULL && strcmp (symname, "jmp") == 0);
+ if (symname == NULL || strcmp (symname, "jmp") != 0)
+ {
+ fprintf (stderr,
+ "case 3: expected symname 'raise' got '%s'\n", symname);
+ abort ();
+ }
mod = dwfl_addrmodule (dwfl, pc - 1);
if (mod)
symname2 = dwfl_module_addrname (mod, pc - 1);
- assert (symname2 == NULL || strcmp (symname2, "jmp") != 0);
+ if (symname2 == NULL || strcmp (symname2, "jmp") != 0)
+ {
+ fprintf (stderr,
+ "case 3: expected symname2 'jmp' got '%s'\n", symname2);
+ abort ();
+ }
break;
}
FALLTHROUGH;
@@ -137,11 +165,22 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
duplicate_sigusr2 = true;
break;
}
- assert (symname != NULL && strcmp (symname, "stdarg") == 0);
+ if (symname == NULL || strcmp (symname, "stdarg") != 0)
+ {
+ fprintf (stderr,
+ "case 4: expected symname 'stdarg' got '%s'\n", symname);
+ abort ();
+ }
break;
case 5:
/* Verify we trapped on the very last instruction of child. */
- assert (symname != NULL && strcmp (symname, "backtracegen") == 0);
+ if (symname == NULL || strcmp (symname, "backtracegen") != 0)
+ {
+ fprintf (stderr,
+ "case 5: expected symname 'backtracegen' got '%s'\n",
+ symname);
+ abort ();
+ }
mod = dwfl_addrmodule (dwfl, pc);
if (mod)
symname2 = dwfl_module_addrname (mod, pc);
@@ -151,7 +190,15 @@ callback_verify (pid_t tid, unsigned frameno, Dwarf_Addr pc,
// instructions or even inserts some padding instructions at the end
// (which apparently happens on ppc64).
if (use_raise_jmp_patching)
- assert (symname2 == NULL || strcmp (symname2, "backtracegen") != 0);
+ {
+ if (symname2 != NULL && strcmp (symname2, "backtracegen") == 0)
+ {
+ fprintf (stderr,
+ "use_raise_jmp_patching didn't expect symname2 "
+ "'backtracegen'\n");
+ abort ();
+ }
+ }
break;
}
}

View File

@ -1,6 +1,6 @@
Name: elfutils Name: elfutils
Version: 0.185 Version: 0.186
%global baserelease 5 %global baserelease 1
Release: %{baserelease}%{?dist} Release: %{baserelease}%{?dist}
URL: http://elfutils.org/ URL: http://elfutils.org/
%global source_url ftp://sourceware.org/pub/elfutils/%{version}/ %global source_url ftp://sourceware.org/pub/elfutils/%{version}/
@ -42,11 +42,11 @@ BuildRequires: pkgconfig(libarchive) >= 3.1.2
# For tests need to bunzip2 test files. # For tests need to bunzip2 test files.
BuildRequires: bzip2 BuildRequires: bzip2
BuildRequires: zstd BuildRequires: zstd
# For the run-debuginfod-find.sh test case in %%check for /usr/sbin/ss # For the run-debuginfod-find.sh test case in %%check for /usr/sbin/ss etc.
BuildRequires: iproute BuildRequires: iproute
BuildRequires: procps
BuildRequires: bsdtar BuildRequires: bsdtar
BuildRequires: curl BuildRequires: curl
BuildRequires: procps
BuildRequires: automake BuildRequires: automake
BuildRequires: autoconf BuildRequires: autoconf
@ -62,7 +62,6 @@ BuildRequires: gettext-devel
%endif %endif
# Patches # Patches
Patch1: elfutils-0.185-raise-pthread_kill-backtrace.patch
%description %description
Elfutils is a collection of utilities, including stack (to show Elfutils is a collection of utilities, including stack (to show
@ -238,14 +237,6 @@ autoreconf -f -v -i
find . -name \*.sh ! -perm -0100 -print | xargs chmod +x find . -name \*.sh ! -perm -0100 -print | xargs chmod +x
%build %build
# This package uses top level ASM constructs which are incompatible with LTO.
# Top level ASMs are often used to implement symbol versioning. gcc-10
# introduces a new mechanism for symbol versioning which works with LTO.
# Converting packages to use that mechanism instead of toplevel ASMs is
# recommended.
# Disable LTO
%define _lto_cflags %{nil}
# Remove -Wall from default flags. The makefiles enable enough warnings # Remove -Wall from default flags. The makefiles enable enough warnings
# themselves, and they use -Werror. Appending -Wall defeats the cases where # themselves, and they use -Werror. Appending -Wall defeats the cases where
# the makefiles disable some specific warnings for specific code. # the makefiles disable some specific warnings for specific code.
@ -282,10 +273,7 @@ touch ${RPM_BUILD_ROOT}%{_localstatedir}/cache/debuginfod/debuginfod.sqlite
# Record some build root versions in build.log # Record some build root versions in build.log
uname -r; rpm -q binutils gcc glibc || true uname -r; rpm -q binutils gcc glibc || true
# FIXME for 0.186 %make_build check || (cat tests/test-suite.log; false)
# run-debuginfod-find.sh is a bad test
# %%make_build check || (cat tests/test-suite.log; false)
%make_build check || (cat tests/test-suite.log; true)
# Only the latest Fedora and EPEL have these scriptlets, # Only the latest Fedora and EPEL have these scriptlets,
# older Fedora and plain RHEL don't. # older Fedora and plain RHEL don't.
@ -377,7 +365,9 @@ fi
%{_libdir}/libdebuginfod.so.* %{_libdir}/libdebuginfod.so.*
%{_bindir}/debuginfod-find %{_bindir}/debuginfod-find
%{_mandir}/man1/debuginfod-find.1* %{_mandir}/man1/debuginfod-find.1*
%{_mandir}/man7/debuginfod*.7*
%config(noreplace) %{_sysconfdir}/profile.d/* %config(noreplace) %{_sysconfdir}/profile.d/*
%config(noreplace) %{_sysconfdir}/debuginfod/*
%files debuginfod-client-devel %files debuginfod-client-devel
%{_libdir}/pkgconfig/libdebuginfod.pc %{_libdir}/pkgconfig/libdebuginfod.pc
@ -409,6 +399,30 @@ exit 0
%systemd_postun_with_restart debuginfod.service %systemd_postun_with_restart debuginfod.service
%changelog %changelog
* Wed Nov 10 2021 Mark Wielaard <mjw@fedoraproject.org> - 0.186-1
- Upgrade to upstream 0.186
- debuginfod-client: Default $DEBUGINFOD_URLS is computed from
drop-in files /etc/debuginfod/*.urls rather than
hardcoded into the /etc/profile.d/debuginfod*
scripts.
Add $DEBUGINFOD_MAXSIZE and $DEBUGINFOD_MAXTIME settings
for skipping large/slow transfers.
Add $DEBUGINFOD_RETRY for retrying aborted lookups.
- debuginfod: Supply extra HTTP response headers, describing
archive/file names that satisfy the requested buildid content.
Support -d :memory: option for in-memory databases.
Protect against loops in federated server configurations.
Add -r option to use -I/-X regexes for grooming stale files.
Protect against wasted CPU from duplicate concurrent requests.
Limit the duration of groom ops roughly to rescan (-t) times.
Add --passive mode for serving from read-only database.
Several other performance improvements & prometheus metrics.
- libdw: Support for the NVIDIA Cuda line map extensions.
DW_LNE_NVIDIA_inlined_call and DW_LNE_NVIDIA_set_function_name
are defined in dwarf.h. New functions dwarf_linecontext and
dwarf_linefunctionname.
- translations: Update Japanese translation.
* Thu Aug 5 2021 Mark Wielaard <mjw@fedoraproject.org> - 0.185-5 * Thu Aug 5 2021 Mark Wielaard <mjw@fedoraproject.org> - 0.185-5
- Use autosetup - Use autosetup
- Add elfutils-0.185-raise-pthread_kill-backtrace.patch - Add elfutils-0.185-raise-pthread_kill-backtrace.patch

View File

@ -1 +1 @@
SHA512 (elfutils-0.185.tar.bz2) = 34de0de1355b11740e036e0fc64f2fc063587c8eb121b19216ee5548d3f0f268d8fc3995176c47190466b9d881007cfa11a9d01e9a50e38af6119492bf8bb47f SHA512 (elfutils-0.186.tar.bz2) = c9180b27ec62935f18b9431268d176f6023d1bb938731d2af6e7626ae460af6608a70ba68483aa1ec7e6cb0fa0528b661ca8b68bc4f58ea8e18af527c5950c78