Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libunwind for openSUSE:Factory 
checked in at 2026-05-28 17:23:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libunwind (Old)
 and      /work/SRC/openSUSE:Factory/.libunwind.new.1937 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libunwind"

Thu May 28 17:23:40 2026 rev:59 rq:1355182 version:1.8.3

Changes:
--------
--- /work/SRC/openSUSE:Factory/libunwind/libunwind.changes      2025-09-30 
17:35:39.540292883 +0200
+++ /work/SRC/openSUSE:Factory/.libunwind.new.1937/libunwind.changes    
2026-05-28 17:23:54.504191764 +0200
@@ -1,0 +2,6 @@
+Mon May 25 14:27:25 UTC 2026 - Christian Boltz <[email protected]>
+
+- Add fix-s390x-tests.diff (part of #1002) to fix endless loop on
+  s390x in Gtest-trace and Ltest-trace
+
+-------------------------------------------------------------------

New:
----
  fix-s390x-tests.diff

----------(New B)----------
  New:
- Add fix-s390x-tests.diff (part of #1002) to fix endless loop on
  s390x in Gtest-trace and Ltest-trace
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libunwind.spec ++++++
--- /var/tmp/diff_new_pack.iU8yye/_old  2026-05-28 17:23:55.344226536 +0200
+++ /var/tmp/diff_new_pack.iU8yye/_new  2026-05-28 17:23:55.348226702 +0200
@@ -40,6 +40,8 @@
 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
+# PATCH-FIX-UPSTREAM 
https://github.com/libunwind/libunwind/pull/1002/changes/9e452a71ff7b3a91574bfba4340b5ee1ed7a4a80
+Patch4:         fix-s390x-tests.diff
 BuildRequires:  automake >= 1.14
 BuildRequires:  gcc-c++
 BuildRequires:  libtool

++++++ fix-s390x-tests.diff ++++++
Taken from 
https://github.com/libunwind/libunwind/pull/1002/changes/9e452a71ff7b3a91574bfba4340b5ee1ed7a4a80
which is part of https://github.com/libunwind/libunwind/pull/1002


dwarf: don't default SP to CFA on s390x
The DWARF standard (§6.4) defines CFA as "the value of the stack
pointer at the call site in the previous frame", so defaulting
SP=CFA after a step is correct for ABIs where that holds.

The s390x ELF ABI [1] defines CFA as R15+160 — the 160-byte
mandatory save area / back-chain header that every frame must
reserve.  This deviates from the DWARF definition: for a frameless
function (no stack allocation), CFA = R15_callee + 160 =
R15_caller + 160, not R15_caller.  Defaulting SP=DWARF_WHERE_CFA
after stepping through such a function (e.g. the kill syscall
wrapper, which emits no DW_CFA_offset rule for R15) therefore
produces the wrong R15 for the caller.  The subsequent frame then
computes its CFA 160 bytes too high, reads the return address from
the wrong location, finds zero, and terminates the unwind after only
2 frames instead of the expected ≥3.

Exclude s390x from the SP=CFA default (ARM and MIPS N64 are already
excluded) so R15 falls back to DWARF_WHERE_SAME and the value from
the ucontext is preserved correctly.

Fixes Gtest-trace and Ltest-trace on s390x.

[1] https://refspecs.linuxfoundation.org/ELF/zSeries/lzsabi0_s390/x1564.html



diff --git a/src/dwarf/Gparser.c b/src/dwarf/Gparser.c
index 648f53f1c..5e0821dc7 100644
--- a/src/dwarf/Gparser.c
+++ b/src/dwarf/Gparser.c
@@ -522,8 +522,11 @@ setup_fde (struct dwarf_cursor *c, dwarf_state_record_t 
*sr)
   for (i = 0; i < DWARF_NUM_PRESERVED_REGS + 2; ++i)
     set_reg (sr, i, DWARF_WHERE_SAME, 0);
 
-#if !defined(UNW_TARGET_ARM) && !(defined(UNW_TARGET_MIPS) && _MIPS_SIM == 
_ABI64)
-  // SP defaults to CFA (but is overridable)
+#if !(defined(UNW_TARGET_MIPS) && _MIPS_SIM == _ABI64) \
+    && !defined(UNW_TARGET_S390X)
+  /* SP defaults to CFA. s390x excluded: CFA = R15+160, so this default gives
+     caller's R15 = CFA instead of R15, breaking frameless functions like kill
+     that never emit DW_CFA_offset for R15. */
   set_reg (sr, TDEP_DWARF_SP, DWARF_WHERE_CFA, 0);
 #endif
 

Reply via email to