)]}'
{
  "commit": "3fd498c00d0dec30c179864178715753f536a599",
  "tree": "58965ff118673b033d00f57750c448929c042743",
  "parents": [
    "fe99fa5daea7415973d8909b369e5aa3ac483269"
  ],
  "author": {
    "name": "Goutam Adwant",
    "email": "8672451+goutamadwant@users.noreply.github.com",
    "time": "Fri Oct 09 05:03:54 2026 -0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Fri Oct 09 12:03:54 2026 +0000"
  },
  "message": "[HAL] Reject buffer view size overflows (#24992)\n\nRejects dense buffer views when shape multiplication or packed byte-size\ncalculation exceeds `iree_device_size_t`. Previously, overflowing\ndimensions could wrap to a small value and produce an undersized\nallocation request.\n\nThe size calculation now uses checked multiplication and addition while\npreserving zero-dimension behavior and sub-byte element packing. Dense\nview creation also verifies that the logical byte length fits within the\nbacking buffer, and reshape validates element counts before updating\nmetadata.\n\nTests cover:\n\n- Shape products that wrap to zero or one.\n- Packed-byte multiplication and addition overflow.\n- Maximum-size byte and sub-byte element counts.\n- Zero dimensions following otherwise overflowing dimensions.\n- Dense views larger than their backing buffers.\n- Overflowing reshape attempts.\n- Native and forced 32-bit `iree_device_size_t` configurations.\n\nTested with:\n\n- `iree/hal/buffer_view_util_test`\n- `iree/hal/string_util_test`\n- `iree/tooling/buffer_view_matchers_test`\n- `iree/tooling/function_io_test`\n- `iree/tooling/numpy_io_test`\n- Repository pre-commit hooks for all changed files\n\nThe original `iree-run-module` reproducer was not rerun because the\nvalidation build was configured as runtime-only without compiler tools.\n\nThis addresses the concrete buffer-view overflow case tracked in #3844.\nThe broader size-arithmetic audit remains open.\n\nAI agents assisted with understanding the codebase, writing tests, and\nreviewing the solution.\n\n---------\n\nSigned-off-by: goutamadwant \u003cworkwithgoutam@gmail.com\u003e",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e0268fc3abdcb3b0bd60b9d866424d08cf7ddcc3",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/buffer_view.c",
      "new_id": "fa804fa1516ef6fdc2dcb15bb5a2ad99b618f64d",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/buffer_view.c"
    },
    {
      "type": "modify",
      "old_id": "ea7b4319ac00add9943a37920e3cc5f188bd5aa5",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/buffer_view.h",
      "new_id": "1765469e93a798418e8e1c10c8892b1165d83631",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/buffer_view.h"
    },
    {
      "type": "modify",
      "old_id": "6ee8a0727e8f6225c7c9e86fb527d43135f7bcad",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/buffer_view_util.c",
      "new_id": "3d10a60a4a1827badb5c74ea34a30d3bec29a1ff",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/buffer_view_util.c"
    },
    {
      "type": "modify",
      "old_id": "529e08a22ca7a09e06ebd9df309d860f0ff4559c",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/buffer_view_util.h",
      "new_id": "f32803c6aa4b35a42015a8d9093532e8b7634317",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/buffer_view_util.h"
    },
    {
      "type": "modify",
      "old_id": "b62a3babd3ea36bbf1d71c0bfbac8bd98cc787ee",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/buffer_view_util_test.cc",
      "new_id": "25e6f24075c61010e28e9369597871c08ef222a2",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/buffer_view_util_test.cc"
    },
    {
      "type": "modify",
      "old_id": "a9162d72e29192e2faa6988cf54831a66de6b92a",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/hal/string_util_test.cc",
      "new_id": "352ad766fe5996c1d8c5ecac51b71e78c0d7872b",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/hal/string_util_test.cc"
    },
    {
      "type": "modify",
      "old_id": "eb3aaf0eea2e6ccf4fecb43dce026038ae3dd1c0",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/modules/hal/inline/module.c",
      "new_id": "cba1db75caca8f2f547b1e6df000677712949e70",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/modules/hal/inline/module.c"
    },
    {
      "type": "modify",
      "old_id": "6c51b138a38668fc61f95545898c8176068a4be0",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/modules/hal/module.c",
      "new_id": "f7cf8482c1b9c2db5382dbaed4613aa912801799",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/modules/hal/module.c"
    },
    {
      "type": "modify",
      "old_id": "578f46f77405dcb787e11bcc62516fc5838a4eb8",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/tooling/BUILD.bazel",
      "new_id": "c28fd98cbaca9709519d2b70a4ea92e1a6b1150f",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/tooling/BUILD.bazel"
    },
    {
      "type": "modify",
      "old_id": "3275a2ebf53b872447502c92670a9c39a9fd6dbd",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/tooling/CMakeLists.txt",
      "new_id": "bbd936608288701a13cf2a0eca2c87f4cf06081d",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/tooling/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "822ab9e6d0f450ac19135492cb5c30d2dc01951d",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/tooling/buffer_view_matchers.c",
      "new_id": "d61e0960e7d4670f0487de981579ab0939d5acf2",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/tooling/buffer_view_matchers.c"
    },
    {
      "type": "modify",
      "old_id": "7351286ce42807c1510ccd065d25eadbc562ded3",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/tooling/function_io.c",
      "new_id": "479f379170ebd0daf687bcdaafbc701b750bf839",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/tooling/function_io.c"
    },
    {
      "type": "modify",
      "old_id": "db2a1b043d581eab2c86b9c2056cfe7843e79786",
      "old_mode": 33188,
      "old_path": "runtime/src/iree/tooling/function_io_test.cc",
      "new_id": "7c7b561bd8d07abb23d85127b69932510f77d8c4",
      "new_mode": 33188,
      "new_path": "runtime/src/iree/tooling/function_io_test.cc"
    }
  ]
}
