)]}'
{
  "commit": "744ba176e17bd57c15876cbf35345c75065d064f",
  "tree": "cfcc612e86687bdb1aac0f09768d49b40e6e5fec",
  "parents": [
    "f62f0468d6f3afb0322336e856e92c933fad689b"
  ],
  "author": {
    "name": "VASU SHARMA",
    "email": "44048872+vasu-the-sharma@users.noreply.github.com",
    "time": "Fri May 15 06:59:57 2026 +0530"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Thu May 14 18:35:54 2026 -0700"
  },
  "message": "[UBSan] add pointer/array access checks for aggregate assignment/initialization operands (#190739)\n\nThis PR adds UbSan `null`, `alignment`, and `array-bounds` checks for\naggregate copy operations.\n\nWhen copying scalar types, clang emits `null`/`alignment` checks via\n`EmitCheckedLValue`. However, aggregate copies used `EmitLValue`,\nskipping these checks entirely.\n\nCode changes:\n- `CGExprAgg.cpp`: `EmitCheckedLValue` in `EmitAggLoadOfLValue` (RHS\ncheck)\n- `CGExprAgg.cpp`: `EmitCheckedLValue` in `VisitBinAssign` (LHS check)\n- `CGClass.cpp`: `EmitCheckedLValue` for trivial copy/move constructor\narg\n- `CGExprCXX.cpp`: `EmitCheckedLValue` for trivial `operator\u003d` RHS\n\nTest updates:\n- `ubsan-aggregate-null-align.c`:\n  - 4 cases with IR patterns for LHS/RHS\n  - Other cases verify handler call only\n  - Array bounds condition check for past-the-end\n  - Union type under `USE_UNION` macro\n- `ubsan-new-checks.cpp`: `func_15` updated to use local variable as\nsource, preserving original CHECK-NOT guard against extra alignment\nchecks\n\n---------\n\nCo-authored-by: vasu-ibm \u003cVasu.Sharma2@ibm.com\u003e\nCo-authored-by: Hubert Tong \u003chubert.reinterpretcast@gmail.com\u003e\nGitOrigin-RevId: 7d700221f9e7e88d20c69c3a301614985af3ca2f\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c0482fb13ec7946d9bf1d2c11f992256aac8c647",
      "old_mode": 33188,
      "old_path": "lib/CodeGen/CGClass.cpp",
      "new_id": "de11e8bca43f19832780e2156b18bea548c6d058",
      "new_mode": 33188,
      "new_path": "lib/CodeGen/CGClass.cpp"
    },
    {
      "type": "modify",
      "old_id": "a4282c4f511992685bb1534fd33c02574a62f3f5",
      "old_mode": 33188,
      "old_path": "lib/CodeGen/CGExprAgg.cpp",
      "new_id": "00edf3e99a34e39b80e6d9ec2dc67fade46af51d",
      "new_mode": 33188,
      "new_path": "lib/CodeGen/CGExprAgg.cpp"
    },
    {
      "type": "modify",
      "old_id": "c585523f2718fe113a972b7ca826c4db7b4ca9cb",
      "old_mode": 33188,
      "old_path": "lib/CodeGen/CGExprCXX.cpp",
      "new_id": "0dc2e0bb82114a590f07d62daa135397b3d3c920",
      "new_mode": 33188,
      "new_path": "lib/CodeGen/CGExprCXX.cpp"
    },
    {
      "type": "modify",
      "old_id": "41f44fb088bf157ea59f0725ed8af37885c229c4",
      "old_mode": 33188,
      "old_path": "test/CodeGen/ubsan-aggregate-null-align.c",
      "new_id": "281a18ed5eb4cead36f6a8d527d7c17ea5529ff8",
      "new_mode": 33188,
      "new_path": "test/CodeGen/ubsan-aggregate-null-align.c"
    },
    {
      "type": "modify",
      "old_id": "60edd323648ab09e2e777d741636ca33f4956176",
      "old_mode": 33188,
      "old_path": "test/CodeGenCXX/ubsan-new-checks.cpp",
      "new_id": "9adc0840801b92384ebfc6a52173bf72970289aa",
      "new_mode": 33188,
      "new_path": "test/CodeGenCXX/ubsan-new-checks.cpp"
    }
  ]
}
