)]}'
{
  "commit": "161333d3e7d13dd98386fe346a71a07eadfe4756",
  "tree": "980c06248806439eda55f8a1424a680f90bd8757",
  "parents": [
    "5952ba775e9a4488a47b02c5cda4b9296ffc930e"
  ],
  "author": {
    "name": "Wojciech Litewka",
    "email": "wojciech.litewka@jetbrains.com",
    "time": "Tue Jul 07 12:00:29 2026 +0000"
  },
  "committer": {
    "name": "Build Server",
    "email": "kotlin-build@jetbrains.com",
    "time": "Tue Jul 07 15:55:25 2026 +0200"
  },
  "message": "[K/N] Fix duplicated IR conversion in KonanInteropModuleDeserializer\n\ncaused by a bug in deserialized metadata cache, introduced in 40f054a6.\n\nThe bug would occur as follows:\n1. A C struct (or C enum) `Foo` is requested for deserialization to IR.\n2. retrieveDeclarationsById(\"Foo\", removeMetadataRepresentation \u003d true)\nis called in the process. It replaces allMetadataDeclarations[\"Foo\"]\nwith a `null` entry.\n3. Memory pressure causes (some of) the SoftReferences in\nallMetadataDeclarations to be cleared.\n4. Another class Bar from the same C-interop Klib is requested for\ndeserialization.\n5. Its entry in allMetadataDeclarations was cleared in 3., so\nloadAndCacheMetadata() is called to re-load the metadata from Klib.\n6. It creates and stores a new SoftReference for Bar, but also for Foo.\n7. Later, deserializeAllCStructsAndEnums() is called. It sees a non-null\nentry for Foo, so it thinks Foo was not converted to IR before and\nattempts to do so now.\n8. But in fact it was converted in 1., so this fails with an error\n`IrClassSymbolImpl is already bound`.\n\nThe fix is to make loadAndCacheMetadata() not re-populate `null`\nentries in allMetadataDeclarations, which indicate that a given\ndeclaration was already converted to IR.\n\n#KT-87461 Fixed",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "61d3db6373112c9511a6f613526d988e41a77be7",
      "old_mode": 33188,
      "old_path": "kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanInteropModuleDeserializer.kt",
      "new_id": "5dcc5b755e4b5bc153c23077b149cb5d59a0056f",
      "new_mode": 33188,
      "new_path": "kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/serialization/KonanInteropModuleDeserializer.kt"
    },
    {
      "type": "modify",
      "old_id": "9114a582fb46a80f8ff5d3e1790fbb058a8756bf",
      "old_mode": 33188,
      "old_path": "tests/mute-common.csv",
      "new_id": "7876e7ef26df7937ac85ec7c481506945803f135",
      "new_mode": 33188,
      "new_path": "tests/mute-common.csv"
    }
  ]
}
