Files
freebsd-src/contrib
Jessica Clarke 70509d1d9c Merge commit 6b0a46958c56 from llvm-project (by Piotr Kubaj):
[libunwind][PPC64] Fix unw_getcontext corrupting callee-saved VSX registers on LE (#198371)

  This is the first of two independent fixes for libunwind on ppc64le
  (ELFv2 ABI, little-endian), where two separate bugs together cause
  SIGSEGV during backtracing. This commit addresses the VSX register
  corruption; the TOC-restore fault is handled in a follow-up. Both
  were discovered while debugging lang/rust build failures with
  RUST_BACKTRACE=1 on FreeBSD/powerpc64le (IBM POWER9).

  On ppc64le, `unw_getcontext` saves each VS register with an in-place
  `xxswapd n, n` followed by `stxvd2x`. The swap is needed because
  `stxvd2x` stores doublewords in the wrong order on LE. However, the
  macro never applies a second `xxswapd` to restore the register after
  the store, so all 64 VS registers are permanently corrupted on return
  from `unw_getcontext`.

  This affects every callee-saved VSX register: f14-f31 (VSR14-VSR31)
  and VR20-VR31 (VSR52-VSR63). After `_Unwind_Backtrace` returns, any
  code that uses these registers sees wrong values. In practice this
  manifests as SIGSEGV inside hashbrown's `reserve_rehash`: VR20-VR31
  are corrupted before a SIMD comparison loop runs, producing an
  out-of-bounds access.

  Fix: add a second `xxswapd n, n` after the `stxvd2x` store. Since
  `xxswapd` is its own inverse, the pair is a no-op on the architectural
  register while still writing the correctly byte-swapped value to memory.

MFC after:	1 week
2026-07-28 12:54:04 +01:00
..
2025-09-11 16:16:39 +02:00
2026-07-05 11:31:49 -07:00
2025-11-03 21:18:46 +01:00
2024-06-20 14:34:49 +02:00
2026-06-25 17:44:09 +03:00
2026-06-02 21:54:25 -07:00
…
2026-07-22 10:38:24 +02:00
2026-06-19 09:26:20 +02:00
2026-02-20 21:33:50 -08:00
2026-03-23 11:41:51 -04:00
2026-03-05 17:13:08 +01:00
2026-04-07 09:14:41 -04:00
2026-03-15 00:41:29 -03:00
2025-08-23 10:58:09 -06:00
2026-01-11 16:42:18 +00:00
2026-01-14 16:28:57 +01:00
2026-06-09 00:45:34 +02:00
2026-05-12 07:33:03 -07:00
2026-02-01 10:36:15 -05:00
2026-03-15 23:22:18 -03:00
2025-09-29 22:53:34 +01:00
2025-05-27 22:24:22 +02:00
2026-07-09 08:22:09 +00:00
2026-07-22 12:23:53 +00:00
…
2026-03-31 18:45:14 -07:00