diff --git a/libunwind-1.3.1-no-core-mem-check.patch b/libunwind-1.3.1-no-core-mem-check.patch new file mode 100644 index 0000000..b918c1d --- /dev/null +++ b/libunwind-1.3.1-no-core-mem-check.patch @@ -0,0 +1,24 @@ +diff -up libunwind-1.3.1/src/x86_64/Ginit.c.no-core-mem-check libunwind-1.3.1/src/x86_64/Ginit.c +--- libunwind-1.3.1/src/x86_64/Ginit.c.no-core-mem-check 2020-01-31 10:22:29.176612981 -0500 ++++ libunwind-1.3.1/src/x86_64/Ginit.c 2020-01-31 10:23:01.454979655 -0500 +@@ -140,11 +140,6 @@ static int mincore_validate (void *addr, + return -1; + } + +- for (i = 0; i < (len + PAGE_SIZE - 1) / PAGE_SIZE; i++) +- { +- if (!(mvec[i] & 1)) return -1; +- } +- + return write_validate (addr); + } + #endif +@@ -165,7 +160,7 @@ tdep_init_mem_validate (void) + int ret; + while ((ret = mincore ((void*)addr, PAGE_SIZE, mvec)) == -1 && + errno == EAGAIN) {} +- if (ret == 0 && (mvec[0] & 1)) ++ if (ret == 0) + { + Debug(1, "using mincore to validate memory\n"); + mem_validate_func = mincore_validate; diff --git a/libunwind.spec b/libunwind.spec index 1d745c4..f15b9e6 100644 --- a/libunwind.spec +++ b/libunwind.spec @@ -4,14 +4,17 @@ Summary: An unwinding library Name: libunwind Version: 1.3.1 -Release: 4%{?dist} +Release: 5%{?dist} License: BSD URL: http://savannah.nongnu.org/projects/libunwind - Source: http://download-mirror.savannah.gnu.org/releases/libunwind/libunwind-%{version}.tar.gz #Fedora specific patch Patch1: libunwind-arm-default-to-exidx.patch +# Backport this change from 1.4 +# https://github.com/libunwind/libunwind/commit/05d814b64036b1ea2f0f328b3a985b03559dcf10 +# https://bugzilla.redhat.com/show_bug.cgi?id=1795896 +Patch2: libunwind-1.3.1-no-core-mem-check.patch ExclusiveArch: %{arm} aarch64 hppa ia64 mips ppc %{power64} %{ix86} x86_64 @@ -34,8 +37,10 @@ libunwind. %prep %setup -q %patch1 -p1 -b .default-to-exidx +%patch2 -p1 -b .no-core-mem-check %build +%global optflags %{optflags} -fcommon aclocal libtoolize --force autoheader @@ -85,6 +90,9 @@ echo ====================TESTSUITE DISABLED========================= %{_includedir}/libunwind*.h %changelog +* Fri Jan 31 2020 Tom Callaway - 1.3.1-5 +- backport change from upstream to fix reported test failures (bz1795896) + * Wed Jan 29 2020 Fedora Release Engineering - 1.3.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild