)]}'
{
  "commit": "b0eeb356b84fb7e8773c9a0dd76b354ae2e3f218",
  "tree": "461e38accff6bb2fff6d93825417920dffe54257",
  "parents": [
    "f083530a0655338b5a1b8dfa0d46727cf1048dd9"
  ],
  "author": {
    "name": "Joshua Haberman",
    "email": "haberman@google.com",
    "time": "Wed Nov 01 10:33:11 2023 -0700"
  },
  "committer": {
    "name": "Copybara-Service",
    "email": "copybara-worker@google.com",
    "time": "Wed Nov 01 10:34:44 2023 -0700"
  },
  "message": "Fixed Python memory leak in map lookup.\n\nPreviously we were allocating memory on the message\u0027s arena every time we performed a `map[key]` or `map.get(key)` operation.  This is unnecessary, as the key\u0027s data is only needed ephemerally, for the duration of the lookup, and we can therefore alias the Python object\u0027s string data instead of copying it.\n\nThis required fixing a bug in the convert.c operation.  Previously in the `arena\u003d\u003dNULL` case, if the user passes a bytes object instead of a unicode string, the code would return a pointer to a temporary Python object that had already been freed, leading to use-after-free.  I fixed this by referencing the bytes object\u0027s data directly, and using utf8_range to verify the UTF-8.\n\nFixes: https://github.com/protocolbuffers/protobuf/issues/14571\nPiperOrigin-RevId: 578563555\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "92e9c496c5c37c5af6bd76459616a1fbe035a55f",
      "old_mode": 33188,
      "old_path": "python/BUILD",
      "new_id": "ea1dac3160444dab24b606f3b9a7980004e244ca",
      "new_mode": 33188,
      "new_path": "python/BUILD"
    },
    {
      "type": "modify",
      "old_id": "413c42f7359dd9acf71784e60883638b0eeab060",
      "old_mode": 33188,
      "old_path": "python/convert.c",
      "new_id": "0c1174ba6b7a5cea66e1089a2a33229f9ec5dc8e",
      "new_mode": 33188,
      "new_path": "python/convert.c"
    },
    {
      "type": "modify",
      "old_id": "0bac00da023d92102ad5a3b6b73155f1e7753050",
      "old_mode": 33261,
      "old_path": "python/google/protobuf/internal/message_test.py",
      "new_id": "b0f1ae784fa68383783b081e93396bbf9a45d0a0",
      "new_mode": 33261,
      "new_path": "python/google/protobuf/internal/message_test.py"
    },
    {
      "type": "modify",
      "old_id": "a1d75de9a127069aaca047c11523c2d6481da83c",
      "old_mode": 33188,
      "old_path": "python/map.c",
      "new_id": "6bf12af43808fdff20488ab6071f4f0381c2acc2",
      "new_mode": 33188,
      "new_path": "python/map.c"
    }
  ]
}
