)]}'
{
  "commit": "14545205a91c24fee17728f6aadf9b69a66a618b",
  "tree": "ea8d6f1bb90b5668ba38ecd6c7530bcc2e77fd31",
  "parents": [
    "033bc49c7052f148abc4b301a848f8f421b88647"
  ],
  "author": {
    "name": "Piotr Kubaj",
    "email": "pkubaj@FreeBSD.org",
    "time": "Sat Jul 25 19:11:31 2026 +0000"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Sat Jul 25 12:15:45 2026 -0700"
  },
  "message": "[libunwind][PPC64] Fix unw_getcontext corrupting callee-saved VSX registers on LE (#198371)\n\nThis is the first of two independent fixes for libunwind on ppc64le\n(ELFv2 ABI, little-endian), where two separate bugs together cause\nSIGSEGV during backtracing. This commit addresses the VSX register\ncorruption; the TOC-restore fault is handled in a follow-up. Both\nwere discovered while debugging lang/rust build failures with\nRUST_BACKTRACE\u003d1 on FreeBSD/powerpc64le (IBM POWER9).\n\nOn ppc64le, `unw_getcontext` saves each VS register with an in-place\n`xxswapd n, n` followed by `stxvd2x`. The swap is needed because\n`stxvd2x` stores doublewords in the wrong order on LE. However, the\nmacro never applies a second `xxswapd` to restore the register after\nthe store, so all 64 VS registers are permanently corrupted on return\nfrom `unw_getcontext`.\n\nThis affects every callee-saved VSX register: f14-f31 (VSR14-VSR31)\nand VR20-VR31 (VSR52-VSR63). After `_Unwind_Backtrace` returns, any\ncode that uses these registers sees wrong values. In practice this\nmanifests as SIGSEGV inside hashbrown\u0027s `reserve_rehash`: VR20-VR31\nare corrupted before a SIMD comparison loop runs, producing an\nout-of-bounds access.\n\nFix: add a second `xxswapd n, n` after the `stxvd2x` store. Since\n`xxswapd` is its own inverse, the pair is a no-op on the architectural\nregister while still writing the correctly byte-swapped value to memory.\nGitOrigin-RevId: 6b0a46958c56d91e3b2fd5ffecfe163dde1fac3a\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "678187fb52f01b0aa6e3c82524a566a4923ccbe5",
      "old_mode": 33188,
      "old_path": "src/UnwindRegistersSave.S",
      "new_id": "37acbf3c693220877d6dec17c637bb9344600e3c",
      "new_mode": 33188,
      "new_path": "src/UnwindRegistersSave.S"
    }
  ]
}
