)]}'
{
  "commit": "b0be7e4309a7e20f83306afb80dcfc640d9b814f",
  "tree": "4f7d70aff2060a86a70a5d54e5a6760c8f5aa984",
  "parents": [
    "09ec102641520dcbe32b0d6b0a6da6792d020bc4"
  ],
  "author": {
    "name": "Protobuf Team Bot",
    "email": "protobuf-github-bot@google.com",
    "time": "Tue Oct 13 11:02:45 2026 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Tue Oct 13 11:05:37 2026 -0700"
  },
  "message": "Use _upb_Message_AlignedMemsetZero in upb_Message_Clear\n\n`upb_Message_Clear` zeroed the message with a `memset` library call. Use the\nsame inline aligned zeroing as `_upb_Message_New` instead (message sizes are\nmultiples of kUpb_Message_Align, and messages are always\nkUpb_Message_Align-aligned).\n\nAlso stop resetting the size of the message\u0027s internal data (unknown fields and\nextensions) after clearing: the internal data pointer is in the message header,\nwhich the clear zeroes, so nothing refers to that internal data afterwards and\nthe store was dead. (Copies never share internal data: upb_Message_ShallowCopy\ngives the copy its own.) This saves loading the header before the clear.\n\nandroid_arm64 (-c opt, fasttable), upb_Message_DeepCopy (which inlines\nupb_Message_Clear), before:\n\n  stp   x30, x23, [sp, #-0x30]!\n  stp   x22, x21, [sp, #0x10]\n  stp   x20, x19, [sp, #0x20]\n  mov   x20, x2\n  ldr   x8, [x0]\n  ldrh  w2, [x2, #0x8]\n  mov   x21, x1\n  mov   w1, wzr\n  mov   x19, x3\n  mov   x22, x0\n  and   x23, x8, #0xfffffffffffffffe\n  bl    memset\n  cbz   x23, 1f\n  str   wzr, [x23]\n1:mov   x0, x22\n  mov   x1, x21\n  mov   x2, x20\n  mov   x3, x19\n  bl    _upb_Message_Copy\n  ldp   x20, x19, [sp, #0x20]\n  cmp   x0, #0x0\n  ldp   x22, x21, [sp, #0x10]\n  cset  w0, ne\n  ldp   x30, x23, [sp], #0x30\n  ret\n\nafter (no call, so no callee-saved registers to spill around it, and no\nload and store of the internal data):\n\n  str   x30, [sp, #-0x10]!\n  ldrh  w8, [x2, #0x8]\n  mov   x9, x0\n  add   x10, x0, x8\n  str   xzr, [x9]\n  cmp   x8, #0x8\n  b.eq  2f\n1:stp   xzr, xzr, [x9], #0x10\n  stp   xzr, xzr, [x10, #-0x10]!\n  cmp   x9, x10\n  b.lo  1b\n2:bl    _upb_Message_Copy\n  cmp   x0, #0x0\n  cset  w0, ne\n  ldr   x30, [sp], #0x10\n  ret\n\nThe error path of `_upb_Message_Copy`, which clears `dst`, likewise replaces\nits `memset` call with the inline loop. No other function in the upb message,\nwire and decode_fast objects changes.\n\nPiperOrigin-RevId: 998754226\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5d83a16316054532f884b11f607292d3ff595ce7",
      "old_mode": 33188,
      "old_path": "upb/message/internal/accessors.h",
      "new_id": "e1af48709afb8d869300929fd017cd767c25327f",
      "new_mode": 33188,
      "new_path": "upb/message/internal/accessors.h"
    }
  ]
}
