SHA256
8
0
forked from pool/libunwind

- 0001-Fix-unw_is_signal_frame-for-RISC-V.patch: Fix unw_is_signal_frame

for RISC-V

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libunwind?expand=0&rev=78
This commit is contained in:
2025-06-02 10:14:58 +00:00
committed by Git OBS Bridge
commit e02475422a
13 changed files with 4456 additions and 0 deletions
+581
View File
@@ -0,0 +1,581 @@
-------------------------------------------------------------------
Fri May 30 17:44:37 UTC 2025 - Andreas Schwab <schwab@suse.de>
- 0001-Fix-unw_is_signal_frame-for-RISC-V.patch: Fix unw_is_signal_frame
for RISC-V
-------------------------------------------------------------------
Mon May 26 07:27:57 UTC 2025 - Pedro Monreal <pmonreal@suse.com>
- Update to 1.8.2:
* Rework inline aarch64 as for setcontext
* Fixed miscompilation of unw_getcontext() on ARM
* Support -mbranch-protection=pac-ret on aarch64
* Add unw_is_plt_entry() to public API (fixes FTBFS on QNX)
* Fix signal handling for QNX aarch64
-------------------------------------------------------------------
Sat Apr 5 14:20:12 UTC 2025 - Friedrich Haubensak <hsk17@mail.de>
- Add malloc-prototype.patch to fix gcc15 compile time error
-------------------------------------------------------------------
Fri Mar 22 09:28:07 UTC 2024 - Fabian Vogt <fvogt@suse.com>
- Drop BuildRequires on latex2man, the tarball has manpages already.
This avoids a large dependency chain:
* Add dont-disable-documentation-without-latex2man.patch
-------------------------------------------------------------------
Fri Feb 23 11:43:14 UTC 2024 - Pedro Monreal <pmonreal@suse.com>
- Update to 1.8.1:
* Fix issue #713 by @cshung in #717
* Add do-release script by @bregma in #725
* Backport dotnet-runtime fixes to the 1.8 branch by @bregma in #726
* [v1.8] Make tests installable by @bregma in #722
* Bump version to 1.8.1 by @bregma in #727
-------------------------------------------------------------------
Mon Feb 12 13:57:28 UTC 2024 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Disable LTO on aarch64 until upstream fix the issue:
https://github.com/libunwind/libunwind/issues/693
-------------------------------------------------------------------
Tue Jan 30 11:33:15 UTC 2024 - Pedro Monreal <pmonreal@suse.com>
- Update to 1.8.0:
* Improve unwinding through a bad function pointer on x86_64
* Fix UMRs indicated by valgrind (x86_64)
* fix byte_order_is_valid function logic
* Use size_t to match R.H.S
* Move get_proc_info_in_range under dwarf/
* Bump actions/checkout@v2 to @V3
* dwarf_find_unwind_table: Find load_base correctly when current
segment does not start at segbase
* Add introspection for march=armv8-a+sve
* Linux: Make get_elf_image guaranteed AS-safe
* Provide syscall wrappers for mmap and munmap
* Allow to use a custom dl_iterate_phdr implementation
* aarch64: unw_step() validates address before calling dwarf_get
* Provide AS-safe allocator to LZMA
* Rework register load in aarch64_local_resume()
* Fix arm postdecrement
* Added support for unwinding through PPC64 PLT entries
* Fix array indexing bug in dwarf_search_unwind_table
* Fix unaligned memory accesses in */Ginit.c
* Get filename and offset from ip
* Fix maps leak if caller's pathlen is too small
* Adjust DYNAMIC addrs in loaded image
* Fix crash in elf_w(valid_object)
* Fix segfault on QNX
-------------------------------------------------------------------
Wed Aug 30 09:24:53 UTC 2023 - Pedro Monreal <pmonreal@suse.com>
- Update to 1.7.2:
* Don't override sp on arm and mips64.
* Add direct dependent libraries to remotes.
* Fix make install failure.
-------------------------------------------------------------------
Wed Aug 28 12:34:01 UTC 2023 - Pedro Monreal <pmonreal@suse.com>
- Update to 1.7.1:
* Bump to release 1.7.1 to fix source tarball naming issue
-------------------------------------------------------------------
Fri Jun 23 18:49:48 UTC 2023 - Pedro Monreal <pmonreal@suse.com>
- Update to 1.7.0:
* DWARF: dwarf4 fix cie parsing.
* x86_64: Stop aliasing RSP and CFA.
* Prefer EXTBL unwinding on ARM.
* [GCC pedantic] Fix "error: comma at end of enumerator list"
when linking to libunwind.
* Fix table indexing in dwarf_search_unwind_table.
* Expose function-pointer-to-name API.
* Add port for Linux on LoongArch.
* Add more POSIX polyfills for nix cross-build on win.
* DWARF: avoid a data race.
* skip latex2man check with --disable-documentation.
* Skip init_mem_validate calls during remote unwind.
* [Loongarch64] amend the LoongArch64's CMakeLists.txt and compiling error.
* Update license in pal-single-threaded.c.
* Fix to malloc call in tdep_get_elf_image.
* Updated to determine PAGE_SIZE dynamically.
* Unwind with pointer authentication on arm64.
* Make some structs non-empty.
* DWARF: avoid invalid memory access with invalid CFI.
* fix incorrect store in AArch64 getcontext.
* avoid leaking registers across sigreturn.
* Use constant for array size in os-linux.
* added coredump support for s390x.
* Allow an alternate LOG_DRIVER to be specified.
* Remove bashisms from tests/check-namespace.sh.
* Add autodetection of procfs_status type.
* Add remote unwinding support for macOS.
* Expose get_proc_info_in_range API.
* Autodetect presence of elf_fpregset_t.
* coredump: stop assuming .text and .eh_frame are both in the first
segment of an ELF file.
* Make sigaltstack() optional.
* Add support for arm fp registers unwind.
* updated dist to focal for s390x jobs.
* Add RISC-V machine value in remote unwind.
* Fix SOFTFP case for arm getcontext.
* Added support for unwinding from the vsyscall region.
* Stop the autotools nag about AC_CONFIG_MACRO_DIRS.
* Fix make distcheck due to missing coredump header.
* Fix undefined behavior issues in aarch64.
* Account for lr in aarch64's uc_addr.
* tests/run-coredump-unwind: Skip test if no coredump has been created.
* [LoongArch64] Update the port to latest kernel ABI.
* arm64: Add support for unwinding in SVE functions
* check-namespace.sh: adjust aarch64 symbols.
* Updated to determine PAGE_SIZE dynamically for loongarch64.
* Gia64-test-nat.c: #include <signal.h> for sigaction().
* Fix for unw_backtrace fast path does not work on x86_64.
* fix the way load offset is detected so it works with lld linker.
* Remove the unused powerpc setcontext() dummies.
* Add unw_backtrace2 function.
- Include the man pages, README and LICENSE files.
- Update libunwind.keyring file.
-------------------------------------------------------------------
Mon May 23 07:40:56 UTC 2022 - Andreas Schwab <schwab@suse.de>
- Fix dependencies
- Fix file list
-------------------------------------------------------------------
Wed May 18 07:52:13 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Adjust baselibs.conf for shlib guideline.
-------------------------------------------------------------------
Mon May 16 10:22:02 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Add Conflict markers for earlier combined libunwind.
-------------------------------------------------------------------
Fri May 13 06:35:55 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
- Resolve rpmlint error "libunwind.x86_64: E:
shlib-policy-name-error SONAME: libunwind-coredump.so.0,
expected package suffix: 0"
-------------------------------------------------------------------
Fri May 6 09:25:52 UTC 2022 - Andreas Schwab <schwab@suse.de>
- Enable build on riscv64 and run testsuite
-------------------------------------------------------------------
Thu Apr 21 07:41:05 UTC 2022 - Dirk Müller <dmueller@suse.com>
- update to 1.6.2:
* Fix off-by-one error in x86_64 stack frames
* Fix error in aarch64 unw_sigcontext
* resolve possible null pointer dereference
* Switch to C11 atomics
* RISC-V support
* aarch64 getcontext functionality
-------------------------------------------------------------------
Tue Jan 19 21:29:19 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 1.5.0:
* dwarf: clang doesn't respect the static alias
* Fixed a missing dependency in dwarf-eh.h
* x86_64: Fix tdep_init_done when built with libatomic_ops
* mips: make _step_n64 as a static function
* Added braces to suppress empty if/else warnings
* Delete hardcode of address size to support MIPS64.
* Fix format specifier for int64_t:29
* Add initial support for Solaris x86-64
* x86_64: Add fixup code if previous RIP was invalid
* x86-64: make `is_cached_valid_mem` functional
* arm: clear ip thumb/arm mode bit before move to previous instruction
* Fix compilation with -fno-common.
* Fix off-by-one error in x86_64 stack frames
* aarch64: Fix __sigset build issue on muslC
* Make SHF_COMPRESSED use contingent on its existence
- remove libunwind_U_dyn_info_list.patch (upstream)
-------------------------------------------------------------------
Tue Oct 20 20:01:36 UTC 2020 - Berthold Gunreben <azouhr@opensuse.org>
- Enable s390x for building
-------------------------------------------------------------------
Wed May 13 08:53:38 UTC 2020 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Fix compilation with -fno-common [bsc#1171549]
- Add patch libunwind_U_dyn_info_list.patch
-------------------------------------------------------------------
Tue Apr 28 15:37:18 UTC 2020 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Update to 1.4.0
- Fix compilation with -fno-common.
- arm: clear ip thumb/arm mode bit before move to previous instruction (#131)
- tests: fix test-coredump-unwind without HAVE_EXECINFO_H (#165)
- There are 20 not 9 failing tests on Solaris (#162)
- change asm to __asm__ to support -std=c11 or similar (#149)
- x86-64: make `is_cached_valid_mem` functional (#146)
- Allow to build without weak `backtrace` symbol. (#142)
- fix compile issue on SH platform (#137)
- Add support for zlib compressed elf .debug_frame sections
- README: add libc requirement description (#121)
- Older systems (e.g. RHEL5) do not have pipe2(). (#122)
- x86_64: Add fixup code if previous RIP was invalid (#120)
- Fix format specifier for int64_t:29 (#117)
- Delete hardcode of address size to support MIPS64. (#114)
- Added braces to suppress empty if/else warnings (#112)
- mips: make _step_n64 as a static function
- x86_64: Fix tdep_init_done when built with libatomic_ops
- x86_64: tsan clean (#109)
- Fixed a missing dependency in dwarf-eh.h
- dwarf: clang doesn't respect the static alias (#102)
- Update libunwind.keyring
- Remove libunwind-gcc10-build-fno-common.patch fixed upstream
-------------------------------------------------------------------
Wed Feb 19 09:24:20 UTC 2020 - Pedro Monreal Gonzalez <pmonrealgonzalez@suse.com>
- Fix build with GCC-10: [bsc#1160876]
* In GCC-10, the default option -fcommon will change to -fno-common
- Add libunwind-gcc10-build-fno-common.patch
-------------------------------------------------------------------
Sun Jul 7 21:45:20 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
- Ensure neutrality of description. Avoid name repetition in
summaries.
-------------------------------------------------------------------
Mon Jul 1 09:10:50 UTC 2019 - Andreas Schwab <schwab@suse.de>
- Update to 1.3.1
* Iteration of unwind register states support
* Freebsd/Armv6 support
* Many, many dwarf bugfixes
* Mips remote unwind support
* aarch64 ptrace support
- fix_versioning_libunwind_1.2.1.patch: removed
-------------------------------------------------------------------
Sun Feb 18 18:29:20 UTC 2018 - ronisbr@gmail.com
- Add patch `fix_versioning_libunwind_1.2.1.patch`.
* This patch fixes the upstream bug gh#libunwind/libunwind#30.
This bug was causing the julia build process to fail.
NOTE: This patch shall be removed in the next version of
libunwind.
-------------------------------------------------------------------
Fri Feb 2 11:52:05 UTC 2018 - tchvatal@suse.com
- Update keyring
-------------------------------------------------------------------
Wed Jan 24 04:05:11 UTC 2018 - avindra@opensuse.org
- Upgrade to 1.2.1
* minor package fixes for tilegx, mips, others
* fix missing include file issues
- cleanup with spec-cleaner
- do not ship static libraries
-------------------------------------------------------------------
Mon Jun 20 09:12:10 UTC 2016 - tchvatal@suse.com
- Enable minidebugs parsing with lzma
-------------------------------------------------------------------
Tue May 17 11:10:54 UTC 2016 - tchvatal@suse.com
- Version update to 1.2-rc1, should include all our patches:
* 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
* 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
* libunwind-1.1-expected-fails.patch
* libunwind-CVE-2015-3239.patch
* libunwind-aarch64.patch
* libunwind-ppc64le.patch
* libunwind-1.1-tests.diff
-------------------------------------------------------------------
Sun Apr 24 16:25:21 UTC 2016 - matwey.kornilov@gmail.com
- Add patches for boo#976955:
* 0001-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
* 0002-Mark-run-ptrace-mapper-and-run-ptrace-misc-as-XFAIL-.patch
-------------------------------------------------------------------
Thu Jul 2 12:47:57 UTC 2015 - tchvatal@suse.com
- Add patch for bnc#936786 CVE-2015-3239, off by one:
* libunwind-CVE-2015-3239.patch
-------------------------------------------------------------------
Sun Mar 29 18:47:32 UTC 2015 - meissner@suse.com
- added baselibs.conf for -xxbit packages
-------------------------------------------------------------------
Wed Mar 4 12:02:48 UTC 2015 - mpluskal@suse.com
- Use url for source
- Add gpg signature
-------------------------------------------------------------------
Mon May 19 12:26:43 UTC 2014 - tchvatal@suse.com
- Clean up with spec-cleaner
- Add dependency over libatomic_opts that was missing
- Do not disable fortify-sources as it seems to work with it anyway
-------------------------------------------------------------------
Tue Dec 17 21:07:33 UTC 2013 - uweigand@de.ibm.com
- libunwind-ppc64le.patch: Add support for ppc64le
-------------------------------------------------------------------
Wed Dec 11 20:17:22 UTC 2013 - dvaleev@suse.com
- add ppc64le
-------------------------------------------------------------------
Mon Aug 12 10:46:30 UTC 2013 - schwab@suse.de
- libunwind-aarch64.patch: Add support for AArch64 from upstream
-------------------------------------------------------------------
Sat Jan 26 08:19:34 UTC 2013 - dmueller@suse.com
- filelist fix for ARM
-------------------------------------------------------------------
Tue Dec 11 18:15:57 UTC 2012 - dvaleev@suse.com
- update to libunwind 1.1:
coredump unwind support
New arch: SuperH
Improved support for PowerPC, ARM
Lots of cleanups, perf tweaks
pkg-config support
- drop all upstreamed patches
- refresh libunwind-1.1-tests.diff patch
- enable ppc ppc64 build
- Mark some tests as expected to fail
libunwind-1.1-expected-fails.patch
-------------------------------------------------------------------
Mon Aug 20 23:37:17 UTC 2012 - agraf@suse.com
- add support for ARM
-------------------------------------------------------------------
Mon Mar 5 22:35:56 CET 2012 - dmueller@suse.de
- remove build from ARM
-------------------------------------------------------------------
Thu Feb 9 15:53:49 UTC 2012 - jengelh@medozas.de
- Remove redundant tags/sections
- Fix dangling symlink /usr/lib/libunwind.so (which was
pointing at "libunwind.so.8.*", verbatim asterisk)
- Throw out .la file
-------------------------------------------------------------------
Wed Nov 23 09:24:25 UTC 2011 - coolo@suse.com
- add libtool as buildrequire to avoid implicit dependency
-------------------------------------------------------------------
Mon Nov 7 19:12:14 CET 2011 - dmueller@suse.de
- disable testsuite when running under qemu
-------------------------------------------------------------------
Mon Oct 17 16:03:13 CEST 2011 - dmueller@suse.de
- update to libunwind 1.0.1:
* hundreds of fixes, see http://git.savannah.gnu.org/gitweb/?p=libunwind.git;a=shortlog
for details
* ARM support
* Greatly improved x86-64 support thanks to Arun Sharma.
* Support for PPC64 added by Jose Flavio Aguilar Paulino.
* Testing, stability and many fixes on x86 (Paul Pluzhnikov)
* Improved local and remote unwinding on ARM (Ken Werner)
* Fast unwind (rbp, rsp, rip only) on x86_64 with a fallback to slow code paths
-------------------------------------------------------------------
Sun Oct 31 12:37:02 UTC 2010 - jengelh@medozas.de
- Use %_smp_mflags
-------------------------------------------------------------------
Thu Jan 28 12:59:59 CET 2010 - rguenther@suse.de
- Build without _FORTIFY_SOURCE, recent glibc fortify longjmp which
confuses libunwind a lot and breaks the build.
-------------------------------------------------------------------
Thu Oct 15 16:43:17 CEST 2009 - marek.belisko@open-nandra.com
- Fix typo in Gtest-dyn1.c (bnc#531705)
-------------------------------------------------------------------
Mon Jan 26 19:37:58 CET 2009 - schwab@suse.de
- Fix overlapping memcpy.
-------------------------------------------------------------------
Tue May 13 18:09:29 CEST 2008 - schwab@suse.de
- Update to libunwind 0.98.6.
** Fix address-leak triggered by invalid byte-order. Fixed by Andreas Schwab.
** On ia64, get_static_proc_name() no longer uses a weak reference to
_Uelf64_get_proc_name(), since that was causing problems with archive
libraries and no longer served any apparent purpose. Fixed by
Curt Wohlgemuth.
-------------------------------------------------------------------
Fri Apr 18 17:26:49 CEST 2008 - rguenther@suse.de
- Fix build.
-------------------------------------------------------------------
Wed Jun 6 14:03:41 CEST 2007 - schwab@suse.de
- Fix memory leak.
-------------------------------------------------------------------
Thu Jan 26 01:59:01 CET 2006 - schwab@suse.de
- Run ldconfig.
-------------------------------------------------------------------
Wed Jan 25 21:30:26 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Mon Nov 14 01:36:47 CET 2005 - schwab@suse.de
- Undo last change.
-------------------------------------------------------------------
Mon Oct 31 18:57:27 CET 2005 - dmueller@suse.de
- build with nonexecutable stack
-------------------------------------------------------------------
Fri Jul 22 16:08:32 CEST 2005 - schwab@suse.de
- Remove broken tests.
-------------------------------------------------------------------
Mon May 2 23:19:19 CEST 2005 - schwab@suse.de
- Fix broken test.
-------------------------------------------------------------------
Sat Apr 23 14:30:58 CEST 2005 - schwab@suse.de
- Only libunwind needs to be in /lib.
- There are no expected testsuite failures on ia64 any more.
-------------------------------------------------------------------
Thu Apr 21 12:11:04 CEST 2005 - schwab@suse.de
- Update to libunwind 0.98.5.
-------------------------------------------------------------------
Fri Feb 25 11:39:59 CET 2005 - schwab@suse.de
- Update to libunwind 0.98.4.
-------------------------------------------------------------------
Fri Feb 4 00:41:07 CET 2005 - schwab@suse.de
- Fix libdir.
- Fix warning.
-------------------------------------------------------------------
Tue Dec 7 16:13:52 CET 2004 - schwab@suse.de
- Update to libunwind 0.98.3.
-------------------------------------------------------------------
Mon Nov 15 00:38:29 CET 2004 - schwab@suse.de
- Don't move around libtool libraries.
-------------------------------------------------------------------
Sun Nov 14 16:50:54 CET 2004 - schwab@suse.de
- Split off libunwind-devel.
- Move library to /lib.
- Remove broken test.
-------------------------------------------------------------------
Fri Nov 5 14:24:02 CET 2004 - schwab@suse.de
- Update to libunwind 0.98.2.
-------------------------------------------------------------------
Thu Oct 28 17:36:30 CEST 2004 - schwab@suse.de
- Update to libunwind 0.98.1.
-------------------------------------------------------------------
Wed Sep 29 14:57:05 CEST 2004 - schwab@suse.de
- Fix installed headers.
-------------------------------------------------------------------
Thu Sep 9 23:21:14 CEST 2004 - schwab@suse.de
- Update to libunwind 0.98.
- Enable building on x86_64.
-------------------------------------------------------------------
Thu Aug 19 11:43:49 CEST 2004 - schwab@suse.de
- Update to libunwind 0.97.
-------------------------------------------------------------------
Sun Apr 18 19:26:44 CEST 2004 - schwab@suse.de
- Pacify autobuild.
-------------------------------------------------------------------
Fri Dec 5 14:24:28 CET 2003 - schwab@suse.de
- Update to libunwind 0.96.
-------------------------------------------------------------------
Thu Dec 4 15:38:42 CET 2003 - schwab@suse.de
- Update to libunwind 0.95.
-------------------------------------------------------------------
Fri Sep 26 21:54:40 CEST 2003 - schwab@suse.de
- Update to libunwind 0.93.
-------------------------------------------------------------------
Wed Jul 23 12:09:36 CEST 2003 - schwab@suse.de
- Fix typo in specfile.
-------------------------------------------------------------------
Thu Jul 11 11:13:03 CEST 2002 - schwab@suse.de
- Initial version.
+180
View File
@@ -0,0 +1,180 @@
#
# spec file for package libunwind
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
# Disable LTO on aarch64
# https://github.com/libunwind/libunwind/issues/693
%ifarch aarch64
%define _lto_cflags %{nil}
%endif
# Note the wrong version number from upstream
Name: libunwind
Version: 1.8.2
Release: 0
Summary: Call chain detection library
License: MIT
Group: System/Base
URL: https://savannah.nongnu.org/projects/libunwind/
Source0: https://github.com/libunwind/libunwind/releases/download/v%{version}/%{name}-%{version}.tar.gz#/%{name}-%{version}.tar.gz
Source1: https://github.com/libunwind/libunwind/releases/download/v%{version}/%{name}-%{version}.tar.gz.asc#/%{name}-%{version}.tar.gz.asc
Source2: %{name}.keyring
Source3: baselibs.conf
# PATCH-FIX-UPSTREAM https://github.com/libunwind/libunwind/pull/712
Patch1: dont-disable-documentation-without-latex2man.patch
# PATCH-FIX-UPSTREAM https://github.com/libunwind/libunwind/pull/831
Patch2: malloc-prototype.patch
# PATCH-FIX-UPSTREAM https://github.com/libunwind/libunwind/commit/3705baed
Patch3: 0001-Fix-unw_is_signal_frame-for-RISC-V.patch
BuildRequires: automake >= 1.14
BuildRequires: gcc-c++
BuildRequires: libtool
BuildRequires: lzma-devel
BuildRequires: pkgconfig
ExcludeArch: s390
%description
A C programming interface (API) to determine the call chain of a program.
%package -n libunwind8
Summary: Call chain detection library for process self-inspection
Group: System/Libraries
Conflicts: libunwind < %{version}-%{release}
%description -n libunwind8
A C programming interface (API) to determine the call chain of a
program from within the same process.
%package -n libunwind-coredump0
Summary: Call chain detection library for coredump images
Group: System/Libraries
Conflicts: libunwind < %{version}-%{release}
%description -n libunwind-coredump0
A C programming interface (API) to determine the call chains
of the threads in coredump images.
%package -n libunwind-ptrace0
Summary: Call chain detection library for ptraced processes
Group: System/Libraries
Conflicts: libunwind < %{version}-%{release}
%description -n libunwind-ptrace0
A C programming interface (API) to determine the call chains of
another process by means of using ptrace(2) on it.
%package -n libunwind-setjmp0
Summary: Non-local goto (setjmp/longmap) implementation based on libunwind
Group: System/Libraries
Conflicts: libunwind < %{version}-%{release}
%description -n libunwind-setjmp0
The unwind-setjmp library offers a libunwind-based implementation of
non-local gotos. This is a drop-in replacement for the normal,
system-provided routines of the same name. With this library, setting
up a non-local goto via setjmp is generally faster compared to the
system routines, at the cost of a much slower longjmp.
%package devel
Summary: Headers for the Unwind library
Group: Development/Libraries/C and C++
%ifnarch ppc ppc64 ppc64le s390x
Requires: libunwind-coredump0 = %{version}-%{release}
%endif
Requires: libunwind-ptrace0 = %{version}-%{release}
Requires: libunwind-setjmp0 = %{version}-%{release}
Requires: libunwind8 = %{version}-%{release}
%description devel
A set of C programming interfaces to determine the call chain within a running
program (libunwind), of a coredump image (libunwind-coredump), or of a separate
process (libunwind-ptrace).
%prep
%autosetup -p1 -n %{name}-%{version}
%build
autoreconf -fiv
%configure \
--enable-minidebuginfo
%make_build
%check
# run-coredump-unwind fails
%make_build check || :
%install
%make_install
find %{buildroot} -iregex '.*\.l?a$' -delete -print
# Help packagers with %%files
find %{buildroot}/%{_libdir} -type f | sort
# Do not install the test files
rm -rf %{buildroot}%{_libexecdir}/%{name}
%post -n libunwind8 -p /sbin/ldconfig
%postun -n libunwind8 -p /sbin/ldconfig
%post -n libunwind-coredump0 -p /sbin/ldconfig
%postun -n libunwind-coredump0 -p /sbin/ldconfig
%post -n libunwind-ptrace0 -p /sbin/ldconfig
%postun -n libunwind-ptrace0 -p /sbin/ldconfig
%post -n libunwind-setjmp0 -p /sbin/ldconfig
%postun -n libunwind-setjmp0 -p /sbin/ldconfig
%files -n libunwind8
%license COPYING
%doc README NEWS
%{_libdir}/libunwind.so.8*
%ifarch %arm
%{_libdir}/libunwind-arm.so.8*
%else
%ifarch riscv32 riscv64
%{_libdir}/libunwind-riscv.so.8*
%else
%ifarch %ix86
%{_libdir}/libunwind-x86.so.8*
%else
%ifarch ppc
%{_libdir}/libunwind-ppc32.so.8*
%else
%ifarch ppc64 ppc64le
%{_libdir}/libunwind-ppc64.so.8*
%else
%{_libdir}/libunwind-%{_target_cpu}.so.8*
%endif
%endif
%endif
%endif
%endif
%ifnarch ppc ppc64 ppc64le s390x
%files -n libunwind-coredump0
%{_libdir}/libunwind-coredump.so.0*
%endif
%files -n libunwind-setjmp0
%{_libdir}/libunwind-setjmp.so.0*
%files -n libunwind-ptrace0
%{_libdir}/libunwind-ptrace.so.0*
%files devel
%{_includedir}/*
%{_libdir}/%{name}*.so
%{_libdir}/pkgconfig/%{name}*.pc
%{_mandir}/man3/*
%changelog
+23
View File
@@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
+1
View File
@@ -0,0 +1 @@
.osc
@@ -0,0 +1,27 @@
From 3705baed4ddb5a98138d16dd2effcaeaa7e72db5 Mon Sep 17 00:00:00 2001
From: Andreas Schwab <schwab@suse.de>
Date: Wed, 3 Apr 2024 15:13:16 +0200
Subject: [PATCH] Fix unw_is_signal_frame for RISC-V
Don't require the IP to be 8-byte aligned. Instructions can start at any
even address.
---
src/riscv/Gis_signal_frame.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/riscv/Gis_signal_frame.c b/src/riscv/Gis_signal_frame.c
index 92356343..aba71f5b 100644
--- a/src/riscv/Gis_signal_frame.c
+++ b/src/riscv/Gis_signal_frame.c
@@ -57,7 +57,7 @@ unw_is_signal_frame (unw_cursor_t *cursor)
ip = c->dwarf.ip;
- if (!ip || !a->access_mem || (ip & (sizeof(unw_word_t) - 1)))
+ if (!ip || !a->access_mem)
return 0;
if ((ret = (*a->access_mem) (as, ip, &i0, 0, arg)) < 0)
--
2.49.0
+8
View File
@@ -0,0 +1,8 @@
libunwind8
conflicts "libunwind-<targettype>"
libunwind-coredump0
conflicts "libunwind-<targettype>"
libunwind-ptrace0
conflicts "libunwind-<targettype>"
libunwind-setjmp0
conflicts "libunwind-<targettype>"
@@ -0,0 +1,33 @@
From 1e849719a1035f34f44873a44a3d6266a59a5f1d Mon Sep 17 00:00:00 2001
From: Ross Burton <ross.burton@arm.com>
Date: Thu, 18 Jan 2024 12:59:37 +0000
Subject: [PATCH] configure: don't disable documentation if latex2man isn't
present
latex2man is only needed to generate the manpages from the LaTeX
sources, but as the git repository has pregenerated manpages in (and so
do the tarballs) this tool is only needed if the sources have been
changed.
Instead of turning off documentation, just warn that the manpages
cannot be rebuilt.
Signed-off-by: Ross Burton <ross.burton@arm.com>
---
configure.ac | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index 406f3773c..7744251b5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -297,8 +297,7 @@ AC_ARG_ENABLE([documentation],
AC_MSG_RESULT([$enable_documentation])
AC_PATH_PROG([LATEX2MAN],[latex2man])
AS_IF([test "x$LATEX2MAN" = "x" && test "x$enable_documentation" != "xno"], [
- AC_MSG_WARN([latex2man not found. Install latex2man. Disabling docs.])
- enable_documentation="no";
+ AC_MSG_WARN([latex2man not found, unable to regenerate the manpages])
])
AM_CONDITIONAL([CONFIG_DOCS], [test x$enable_documentation != xno])
AM_COND_IF([CONFIG_DOCS], [AC_CONFIG_FILES([doc/Makefile doc/common.tex])])
BIN
View File
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE+G6wn3JxdCbyDTZHCg/4RbfbNCcFAmXXV+cACgkQCg/4Rbfb
NCfxtQ//fWFWIOcGe6SYeah8cfDLLNJkylQ5OgghJKtC3dQACCjowYOtm/+fttBv
PvwYnrM7FI8m5755/etVeSnlTAgUH7M4IRcLcggS6wJNN7id7ffiyk1B2YU/yqUS
rCSh7ZUTSFuMLexIZIby0NRPit1kAEvWMDXXysHb+TNDZj/DbQGVDhYAfTaOl3/+
NQA9ONcOF0PzPHbNVQ6bfhFz2IIS4GCBbbnUnQe587l0J30AN7fB8cHOpv5nPTJj
6ATfN0q3HBmB7iAyZgWgR5CjdK0J2uLQQ1s4YOYCGM/rhC2ooPXtuaRABKwk7zeK
EjBmS8IP8I4qrwSFGSqt0DX141Hx3lE7YG9b9K5yWd/SFRYCjaoW9O9xgkVmjU+I
PAEIQsM9XyKdnel3ornlO+9CyfIlMtASdj+yKZoAljqu/8VKzt2aWS+zaD0U6TgF
Yf2fkm1gjXy1cWa/JuI1qdjIgV93ycwcT6eeBvCG/OYYHtjq80Raa/MhAQaMhKp/
kn2DffZatjslri5gkk9oS2QwZlkh1r2IYaz1G2GYxVzRzvkoLaypzsaR/7YhaO2H
gu3bnKKcLg7fDPmFpB8qzfkc8OmoGGCUPGlw//4gYvsvEj+oAL0Arq0KqLRWY5fb
D8t0SgCRttvs2xkXwF70KGATZcaBU8TEktpE17o07l7dj94esWI=
=xD26
-----END PGP SIGNATURE-----
BIN
View File
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
-----BEGIN PGP SIGNATURE-----
iQIzBAABCgAdFiEE+G6wn3JxdCbyDTZHCg/4RbfbNCcFAmgwfD8ACgkQCg/4Rbfb
NCdc5RAAqWStwvMeFnLIbob34rI/j9dXeQybkUFXG+t4Fzcc6Kh4luiSHk0M8t7S
Fg5lLqbwm7+Y8a3cTH2B8fI+HjhbhY03Fu9yXHbnDToaSErU6APksIAPkosLtV6M
+hsXHpn7fR0mJczD2qmYahFXkv/kAWrAmXa+sxbhMlOeSHZLtnSC4NRkswEX0+2J
XmQAuCMYdnuQJ6LRLZOsUrnFggPakDMayCmXoP+ewZvfTIQurM+i4fBDFNx4ojSL
378W+ZGTjwGDLXEX3KL4HjkiFcYZA0lykBwARxUyIslB3SJyZ/pbW+2tIslpq8/4
ZD7ceyS2K98ctGPx733s8lM10pCD0yN2yBkfTzQK8swbturxAD1YdrnmmNbKCj/l
G4chp3r3FV5Ox8jVeJ/c4EacQodJZEBuyHEdvbHKzpV9uolWlwz3Cyge2P+MV8rk
ozEVsJxJT9Tet9H/VGroqTvYnOSdYyXvit+pIn7u4TJ4zmZj1GscODikxsOMd85X
EnAKSXjzBjXGEdAbie0gYuILEDj5SSDDPt2zW2dj3A+mtizhQIYXLVssqgT72KCg
vKY6PgZWr0URd5fV4YnpCTaqis2Dg/5DKw4dNGPqbw3FHld69G815uMByMc578Dx
CEd9a4kDfE3vzUdvPWcpXnNXM1u6kXq3z5ccoco1s/sXu5KY7Hw=
=iP3H
-----END PGP SIGNATURE-----
+3307
View File
File diff suppressed because it is too large Load Diff
+258
View File
@@ -0,0 +1,258 @@
github.com/libunwind/libunwind/pull/831
github.com/libunwind/libunwind/commit/b67d508
From b67d508a93bf1ba231c18dce3894cfee25c16e0d Mon Sep 17 00:00:00 2001
From: Stephen Webb <swebb@blackberry.com>
Date: Wed, 12 Feb 2025 12:08:07 -0500
Subject: [PATCH] Fix bad prototype for malloc() in test
The unit test Gtest-nomalloc.c had an incorrect prototype for malloc()
which caused newer compilers to fail compiling for newer C editions.
Corrected the prototype and corrected a few other errors. The unit now
compiles using GCC with `CFLAGS=-Wall -Wextra -pedantic -C11` with no
warnings, which is the minimum requirement.
Added the tests/unw_test.h header as a first step to cleaning up some
unit tests further.
---
tests/Gtest-nomalloc.c | 124 +++++++++++++++++++++++------------------
tests/Makefile.am | 2 +-
tests/unw_test.h | 47 ++++++++++++++++
3 files changed, 117 insertions(+), 56 deletions(-)
create mode 100644 tests/unw_test.h
diff --git a/tests/Gtest-nomalloc.c b/tests/Gtest-nomalloc.c
index 5b97fc709..e770ff614 100644
--- a/tests/Gtest-nomalloc.c
+++ b/tests/Gtest-nomalloc.c
@@ -1,78 +1,92 @@
-/* libunwind - a platform-independent unwind library
- Copyright (C) 2009 Google, Inc
- Contributed by Arun Sharma <arun.sharma@google.com>
+/**
+ * @file tests/Gtest-nomalloc.c
+ *
+ * Verify that @c malloc() is not called during an unwinding operation.
+ */
+/*
+ * This file is part of libunwind.
+ * Copyright 2025 Stephen M. Webb <stephen.webb@bregmasoft.ca>
+ * Copyright (C) 2009 Google, Inc
+ * Contributed by Arun Sharma <arun.sharma@google.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
-Permission is hereby granted, free of charge, to any person obtaining
-a copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be
-included in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
-
-#include <unistd.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <dlfcn.h>
#include <libunwind.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
-#define panic(args...) \
- { fprintf (stderr, args); exit (-1); }
+#include "unw_test.h"
-int verbose;
-int num_errors;
+int malloc_call_count;
int in_unwind;
+/**
+ * Intercepted malloc() call.
+ *
+ * If invoked during unwinding this call will increment the test error count
+ * and indicate a failure by returning NULL. Otherwise it just calls the real
+ * malloc().
+ */
void *
-malloc(size_t s)
+malloc (size_t sz)
{
- static void * (*func)();
+ typedef void *(*malloc_t) (size_t);
- if(!func)
- func = (void *(*)()) dlsym(RTLD_NEXT, "malloc");
+ static malloc_t real_malloc = NULL;
+ if (real_malloc == NULL)
+ {
+ real_malloc = (malloc_t)(intptr_t)dlsym (RTLD_NEXT, "malloc");
+ if (real_malloc == NULL)
+ {
+ fprintf (stderr, "no malloc() found\n");
+ exit (UNW_TEST_EXIT_HARD_ERROR); \
+ }
+ }
- if (in_unwind) {
- num_errors++;
- return NULL;
- } else {
- return func(s);
- }
+ if (in_unwind)
+ {
+ malloc_call_count++;
+ }
+ return real_malloc (sz);
}
static void
do_backtrace (void)
{
- unw_word_t ip, sp;
- unw_cursor_t cursor;
+ unw_cursor_t cursor;
unw_context_t uc;
- int ret;
+ int ret;
in_unwind = 1;
unw_getcontext (&uc);
if (unw_init_local (&cursor, &uc) < 0)
- panic ("unw_init_local failed!\n");
+ {
+ fprintf (stderr, "unw_init_local failed!\n");
+ exit (UNW_TEST_EXIT_HARD_ERROR); \
+ }
do
{
- unw_get_reg (&cursor, UNW_REG_IP, &ip);
- unw_get_reg (&cursor, UNW_REG_SP, &sp);
-
ret = unw_step (&cursor);
- if (ret < 0)
- {
- ++num_errors;
- }
}
while (ret > 0);
in_unwind = 0;
@@ -99,12 +113,12 @@ foo1 (void)
int
main (void)
{
- foo1();
+ foo1 ();
- if (num_errors > 0)
+ if (malloc_call_count > 0)
{
- fprintf (stderr, "FAILURE: detected %d errors\n", num_errors);
- exit (-1);
+ fprintf (stderr, "FAILURE: malloc called %d times, expected 0\n", malloc_call_count);
+ exit (UNW_TEST_EXIT_FAIL);
}
- return 0;
+ exit (UNW_TEST_EXIT_PASS);
}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index adc34ac63..60f3f3adc 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -214,7 +214,7 @@ endif
noinst_PROGRAMS = $(noinst_PROGRAMS_common) $(noinst_PROGRAMS_cdep) \
$(noinst_PROGRAMS_arch)
-noinst_HEADERS = ident.h
+noinst_HEADERS = ident.h unw_test.h
do_test_subst = sed -e 's,[@]TESTS[@],$(TESTS),g' \
-e 's,[@]XFAIL_TESTS[@],$(XFAIL_TESTS),g' \
diff --git a/tests/unw_test.h b/tests/unw_test.h
new file mode 100644
index 000000000..9ae86dce1
--- /dev/null
+++ b/tests/unw_test.h
@@ -0,0 +1,47 @@
+/**
+ * @file tests/unw_test.h
+ *
+ * Common unit test API for libunwind.
+ */
+/*
+ * This file is part of libunwind.
+ * Copyright 2025 Stephen M. Webb <stephen.webb@bregmasoft.ca>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+ * IN THE SOFTWARE.
+ */
+#ifndef LIBUNWIND_UNW_TEST_H
+#define LIBUNWIND_UNW_TEST_H 1
+
+/**
+ * Exit values for test programs.
+ * Based on https://www.gnu.org/software/automake/manual/html_node/Scripts_002dbased-Testsuites.html
+ *
+ * These are used to interact with the test harness (eg. a TAP-based harness,
+ * CTest, or automake).
+ */
+enum {
+ UNW_TEST_EXIT_PASS = 0, /* Item under test is a PASS */
+ UNW_TEST_EXIT_FAIL = 1, /* Item under test is a FAIL */
+ UNW_TEST_EXIT_BAD_COMMAND = 2, /* Test program is invoked with invalid arguments */
+ UNW_TEST_EXIT_SKIP = 77, /* Test should be skipped */
+ UNW_TEST_EXIT_HARD_ERROR = 99 /* Test program itself has failed */
+};
+
+#endif /* LIBUNWIND_UNW_TEST_H */
+