)]}'
{
  "commit": "196c18af0755370c62eb0398dcff8a746bc358e5",
  "tree": "73eae08c11bbd2e70f0f18ce5b36f980435c9bff",
  "parents": [
    "85a352faaef9a3b4e10cf9f9ad3b8559ed82f1bd"
  ],
  "author": {
    "name": "Rechie Kho",
    "email": "50512341+RechieKho@users.noreply.github.com",
    "time": "Thu Jun 11 18:08:54 2026 +0800"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Thu Jun 11 12:08:54 2026 +0200"
  },
  "message": "[Runtime] Align `iree_async_posix_worker_t` (#24589)\n\nFix #24578\n\nThe fix includes aligning `iree_async_posix_worker_t` to\n`iree_hardware_constructive_interference_size`.\n\nPertaining to the concern of possible improper offset via pointer\ncasting mentioned in this\n[comment](https://github.com/iree-org/iree/issues/24578#issuecomment-4646834986)\n, it comes from line 179 in file\n`runtime\\src\\iree\\async\\platform\\posix\\proactor.c`:\n```cpp\n  // Set up pointers into trailing data.\n  proactor-\u003eworkers \u003d\n      (iree_async_posix_worker_t*)((uint8_t*)proactor + workers_offset); // \u003c- This\n  proactor-\u003eworker_count \u003d worker_count;\n```\n\nThe worker offset is calculated from line 148 in the same file:\n```cpp\n  IREE_RETURN_AND_END_ZONE_IF_ERROR(\n      z0, IREE_STRUCT_LAYOUT(\n              sizeof(iree_async_proactor_posix_t), \u0026total_size,\n              IREE_STRUCT_FIELD_ALIGNED(\n                  worker_count, iree_async_posix_worker_t,\n                  iree_hardware_destructive_interference_size, \u0026workers_offset), // \u003c- This\n              IREE_STRUCT_FIELD_ALIGNED(\n                  ready_pool_capacity, iree_async_posix_ready_op_t,\n                  iree_hardware_destructive_interference_size,\n                  \u0026ready_entries_offset),\n              IREE_STRUCT_FIELD(completion_pool_capacity,\n                                iree_async_posix_completion_t,\n                                \u0026completion_entries_offset),\n              IREE_STRUCT_FIELD(message_pool_capacity,\n                                iree_async_message_pool_entry_t,\n                                \u0026message_entries_offset)))\n```\n\nFrom what I read, `IREE_STRUCT_FIELD_ALIGNED` considers the alignment. I\nsupposed the offset calculation should be correct, especially with the\nalignment to be the same.\n\nMoreover, I\u0027ve also saw some manual padding in the struct via\n`_padding`. I remove such padding as I suppose the alignment will pad\nfor us.\n\n---------\n\nSigned-off-by: Rechie Kho \u003c50512341+RechieKho@users.noreply.github.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "81f821b20e3480a195f1cebb5a781226085030b4",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/async/platform/posix/proactor.c",
      "new_id": "b3a8fc50924bbae95371dc649445cab000a28a0f",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/async/platform/posix/proactor.c"
    },
    {
      "type": "modify",
      "old_id": "3eca7fc0b62b6d12e15d8c5b9658bdc6ab87b119",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/async/platform/posix/worker.h",
      "new_id": "3c546f43e2039a33b7d73bc65c9483b36c5e6b42",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/async/platform/posix/worker.h"
    }
  ]
}
