From nobody Thu Aug 6 18:04:58 2026 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hGFYR3jBGz6nRY3 for ; Thu, 06 Aug 2026 18:04:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hGFYQ71kmz3kv4 for ; Thu, 06 Aug 2026 18:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786039499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo00fcwbV5JtGsN/KNbNHOSHevnquHvHKqnRo2jH0js=; b=Q+DcrEPNOgpfB3T46XVJlwANVQ8wmrdKnUZqPbKElmwNwq0NFBttQrYMhiXkKk1l2g+ZSR tQvK2S6+cJyM/WmH2bsVg0ph+X7nqv2OkteoxS03gddftNgBgdZzMxRMPFlUwTscpoFoA1 RFUhsQKzDpd5Wrl/p4+snSNtFiQPX0Yf+8kA4PK5uEdMYPZVu7uAAUTpOBwGuSy1AbxLrK qOJVsqORHzwhZT9OG7zf8VseZi7aDUKZHecakpPV5mi1m1+4Fg5ARMxNJipxuqXlzMxYxW egjpRuu/Oq/jZ+nXxLHubd4Xr0LBVAw4QLMaa5iVZ2iWx6+5lN38W/RqRpgrCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1786039499; a=rsa-sha256; cv=none; b=ho8Kv9x9JhlLQ2/nWjkicgJTpyHFglLki/NzxLhhYLYXe4MsCh6OWAIGiKGXWaAl/zqx2N KFKDsLAIPXKizGktfECRbP2W7DKo+oTvmWVKBHYnhVnOtxRg2H57nOdEmQ5I+YeDNpMKyC b7wa7cDtqki4tySS5GOd4qWRRfECuutk5g/xlBC9RiqxzyOr3DeLRfvVtp4bOxSYKdgno4 B9B/Mhz2gdc/OsRFhbEpeYdBUPtDb1XFN0qejroBS4oD1MZIBbe9qHJDZ/wrjVxKrLPKff hPHwON5op3HdE8/4hW+DVJlZcp/dzi87dwDFT5B1xOdRbpPZUwW+AL+xCW6pdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1786039499; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jo00fcwbV5JtGsN/KNbNHOSHevnquHvHKqnRo2jH0js=; b=doOFZm3olkqfTsJo7uG493TUAoD+V8eyNnJJ2VMqu6Qig86x/AM0hRY6p9Yicc8uunfNgx BH54zj1jTxH5TUPP3kiCxYduDGL0s64yeVyZz6IP6drkusDR0utQszPJYpxyCHg5WqhGGE a3Fd+w2ZSDUL+qDFGNEXC90+wWgQafwQfVweQUMolIbB+KUCKwD0v6jOghCWoOzEhZauIm nK0+4FWH9EWp5peeP9k45WgSdQ6JUgh92Z7v8El2B7qvSkJTgOjykPT4JvujrXW4hL9+Q0 5zJDpxFJsJovWksRF7NvPvLvBR2U94stS0FInNkMI3rGiIXjxkgt+gqR5I5Nzg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hGFYQ5n99zXXC for ; Thu, 06 Aug 2026 18:04:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 320c4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 06 Aug 2026 18:04:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jessica Clarke Subject: git: 1f62c6f0fc4a - stable/14 - Merge commit 6b0a46958c56 from llvm-project (by Piotr Kubaj): List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 1f62c6f0fc4a46b028d26765b632da9c4ac651a9 Auto-Submitted: auto-generated Date: Thu, 06 Aug 2026 18:04:58 +0000 Message-Id: <6a74ccca.320c4.18759e77@gitrepo.freebsd.org> The branch stable/14 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=1f62c6f0fc4a46b028d26765b632da9c4ac651a9 commit 1f62c6f0fc4a46b028d26765b632da9c4ac651a9 Author: Jessica Clarke AuthorDate: 2026-07-28 11:54:04 +0000 Commit: Jessica Clarke CommitDate: 2026-08-06 18:04:28 +0000 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 (cherry picked from commit 70509d1d9cba254dfd5b3dd83d8a011b5e125788) --- contrib/llvm-project/libunwind/src/UnwindRegistersSave.S | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/llvm-project/libunwind/src/UnwindRegistersSave.S b/contrib/llvm-project/libunwind/src/UnwindRegistersSave.S index 5139a551ad24..bd41dfcb9db4 100644 --- a/contrib/llvm-project/libunwind/src/UnwindRegistersSave.S +++ b/contrib/llvm-project/libunwind/src/UnwindRegistersSave.S @@ -418,9 +418,13 @@ LnoR2Fix: // register in the incorrect doubleword order. // FIXME: when supporting targets older than Power9 on LE is no longer required // this can be changed to simply `stxv n, 16 * n(4)`. +// Restore the register after storing: xxswapd is its own inverse, so a second +// xxswapd undoes the in-place corruption of callee-saved VSRs (f14-f31, +// VR20-VR31) that would otherwise persist after unw_getcontext returns. #define PPC64_STVS(n) \ xxswapd n, n ;\ stxvd2x n, 0, 4 ;\ + xxswapd n, n ;\ addi 4, 4, 16 #else #define PPC64_STVS(n) \