)]}'
{
  "commit": "7aa2b040236bfa8b60ebec69af60f5a334ee160e",
  "tree": "9f876aaa6fba957b708e2c9ca7aaa23b96df92bc",
  "parents": [
    "1317890e1b81b952dbbd6d4011fc9113d4722488"
  ],
  "author": {
    "name": "Nick Desaulniers",
    "email": "ndesaulniers@google.com",
    "time": "Thu Apr 16 09:15:48 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Apr 16 09:15:48 2026 -0700"
  },
  "message": "[X86] Use unsigned comparison for stack clash probing loop (#192355)\n\nThe stack clash probing loop generated in `EmitLoweredProbedAlloca` used\na signed comparison (`X86::COND_GE`) to determine when the allocation\ntarget had been reached.\n\nIn 32-bit mode, memory addresses above `0x80000000` have the sign bit\nset. If the stack pointer lands in this region, treating the addresses\nas signed integers causes the comparison logic to fail. This leads to\nincorrect loop execution, resulting in an infinite loop and a crash\n(segmentation fault) when setting up custom stacks for pthreads mapped\nabove `0x80000000` in a 32b process.\n\nThis patch changes the condition code to `X86::COND_AE` (Above or\nEqual), which generates an unsigned comparison. This ensures that\naddresses are treated correctly as unsigned quantities on all targets.\n\nOn 64-bit systems, this change has no practical effect on valid\nuser-space addresses because they do not use the sign bit (being\nrestricted to the lower half of the address space). However, using\nunsigned comparison is the correct behavior for pointer arithmetic and\nbounds checks.\n\nReported-by: Wonsik Kim \u003cwonsik@google.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e647286301d6be4b0f329c30280631c86bf97dce",
      "old_mode": 33188,
      "old_path": "llvm/lib/Target/X86/X86ISelLowering.cpp",
      "new_id": "6a00f57e78dd381607b935143adc781165151189",
      "new_mode": 33188,
      "new_path": "llvm/lib/Target/X86/X86ISelLowering.cpp"
    },
    {
      "type": "modify",
      "old_id": "b7d1b593d1ab619260bdd31acf7959975dff96b1",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/X86/stack-clash-dynamic-alloca.ll",
      "new_id": "b89532e0f17a1e2136c1b198def969a93fd46dcb",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/X86/stack-clash-dynamic-alloca.ll"
    },
    {
      "type": "modify",
      "old_id": "ccf7e1d56da903da44003abf6a9ee4b8ebcda6d5",
      "old_mode": 33188,
      "old_path": "llvm/test/CodeGen/X86/stack-clash-small-alloc-medium-align.ll",
      "new_id": "01a1cb136a49aca2efeaa0bf20657c35741552b0",
      "new_mode": 33188,
      "new_path": "llvm/test/CodeGen/X86/stack-clash-small-alloc-medium-align.ll"
    }
  ]
}
