)]}'
{
  "commit": "2f55f9052f4c98d7f6048383e2a8d482ef72f149",
  "tree": "31774c9fc98dd3a313d04cca5264cea41801e7dc",
  "parents": [
    "2fda5b4605b628464d116dd2e9a4cb60fb355630"
  ],
  "author": {
    "name": "Tony Liao",
    "email": "tonyliaoss@google.com",
    "time": "Tue Oct 27 13:45:06 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Mon Nov 02 18:55:58 2026 -0800"
  },
  "message": "upb: don\u0027t use __builtin_memcpy_inline under MemorySanitizer on Clang \u003c 16\n\n`UPB_MEMCPY_INLINE` (introduced in 2a3334473e to avoid PLT calls to memcpy() for field, map and array element copies) expands to `__builtin_memcpy_inline` whenever the builtin exists. MemorySanitizer in LLVM 14 and 15 does not instrument the `llvm.memcpy.inline` intrinsic: the bytes are copied but the destination\u0027s shadow stays poisoned, so every field read through `_upb_MiniTableField_DataCopy` is reported as a use of uninitialized memory (e.g. `_upb_DefPool_AddFile` → `upb_strtable_lookup2` → `Wyhash` on the file name). LLVM 16+ rewrites the intrinsic to `__msan_memcpy()` and is unaffected.\n\nFall back to `memcpy()` when building with MSan on Clang \u003c 16, and move the `UPB_HAS_FEATURE` definition above the macro so it can be used in the condition. No change for GCC, for Clang without MSan, or for Clang \u003e\u003d 16.\n\nVerified with a 15-line repro (false positive on Clang 14.0.6, clean on 23.1.3) and by running `//src/google/protobuf/compiler/rust:generator_test` plus upb unit tests under `-fsanitize\u003dmemory` with Clang 14, which fail without this change and pass with it.\n\nPiperOrigin-RevId: 1008347668\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "651fb423683fb12ede9d3d958768a2701eb8cb8c",
      "old_mode": 33188,
      "old_path": "upb/port/def.inc",
      "new_id": "a087a55468c773b84cd57d435968539cccb90e85",
      "new_mode": 33188,
      "new_path": "upb/port/def.inc"
    }
  ]
}
