)]}'
{
  "commit": "e904d559c5ae071a5d04cdf003021cb3df2bb1a4",
  "tree": "fd3974aafa58ddeeb161682502bd3adf68bbd532",
  "parents": [
    "35118457abeb1ff6109759b26665e5ac90457e6d"
  ],
  "author": {
    "name": "Mehdi Amini",
    "email": "joker.eph@gmail.com",
    "time": "Tue Mar 17 11:38:12 2026 +0100"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Tue Mar 17 11:38:12 2026 +0100"
  },
  "message": "[mlir][bytecode] Fix crashes when reading bytecode with unsupported types (#186354)\n\nWhen using test-kind\u003d2 in the bytecode roundtrip test, integer types\n(i32) are replaced by a custom type (TestI32Type) via a type callback.\nThis exposed two crash scenarios:\n\n1. Reading IntegerAttr with an unsupported type: `getIntegerBitWidth`\nreturns 0 for unsupported types and emits an error, but\n`readAPIntWithKnownWidth` would proceed to call\n`reader.readAPIntWithKnownWidth(0)`, creating a zero-width APInt with a\npotentially non-zero value. Fix: early-return failure when `bitWidth \u003d\u003d\n0`.\n\n2. Reading VectorType with an unsupported element type:\n`VectorType::get` asserts that the element type implements\nVectorElementTypeInterface. When the element type is replaced by a\ncustom type that doesn\u0027t implement this interface, the program crashes.\nFix: use `VectorType::getChecked` with a diagnostic emitter lambda\ninstead of `get\u003cVectorType\u003e` in the bytecode builder.\n\nFixes #128312",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "53a859e32d64bc121e7b65606fd56b3b6ccf0f51",
      "old_mode": 33188,
      "old_path": "mlir/include/mlir/IR/BuiltinDialectBytecode.td",
      "new_id": "64cc8a8ff5e20c502029c20e730432f416b89d8f",
      "new_mode": 33188,
      "new_path": "mlir/include/mlir/IR/BuiltinDialectBytecode.td"
    },
    {
      "type": "modify",
      "old_id": "f7430784dd22223b3dac8be196802adc9c5d374a",
      "old_mode": 33188,
      "old_path": "mlir/lib/IR/BuiltinDialectBytecode.cpp",
      "new_id": "14dc665184099eef9649e3da2b0791d81834cdfd",
      "new_mode": 33188,
      "new_path": "mlir/lib/IR/BuiltinDialectBytecode.cpp"
    },
    {
      "type": "delete",
      "old_id": "f076dcb9b2f1f30bf750ee41403ee5e4714ae47c",
      "old_mode": 33188,
      "old_path": "mlir/test/Bytecode/invalid/invalid-dense-elem-type-interface.mlir",
      "new_id": "0000000000000000000000000000000000000000",
      "new_mode": 0,
      "new_path": "/dev/null"
    },
    {
      "type": "add",
      "old_id": "0000000000000000000000000000000000000000",
      "old_mode": 0,
      "old_path": "/dev/null",
      "new_id": "44d0a4eb8bb4aeb8371edf79811f9c109cbe6b85",
      "new_mode": 33188,
      "new_path": "mlir/test/Bytecode/invalid/invalid-type-remapping.mlir"
    }
  ]
}
