)]}'
{
  "commit": "7d3a860bdf7d9a71fab7ddaf0cd3ad0bdd035686",
  "tree": "5f21e4748efaccb40afeacc83928f58c36f2d68b",
  "parents": [
    "0c22767ec4d9f67b72f03c3a0ea1e2080d8a92f4"
  ],
  "author": {
    "name": "Nicolas Capens",
    "email": "capn@google.com",
    "time": "Thu Sep 16 07:18:22 2021 -0400"
  },
  "committer": {
    "name": "Nicolas Capens",
    "email": "nicolascapens@google.com",
    "time": "Mon Sep 20 17:35:42 2021 +0000"
  },
  "message": "Fix use of deleted shader during compute execution\n\nComputeProgram::run() uses the `shader` member, which was previously a\nweak pointer to a SpirvShader object. If the corresponding shader module\nis destroyed, and there is no (more) pipeline cache to hold a shared_ptr\nreference to it, we\u0027d access a deleted object.\n\nThe `pipelineLayout` member is safe-ish because we explicitly reference\ncount it in the vk::Pipeline class, since graphics pipelines also use it\nto (re)compile routines at draw execution time.\n\nThe ComputeProgramKey was modified to use unique integer identifiers\ninstead of pointers to the shader and pipeline layout. This prevents a\nfalse cache hit when these objects are destroyed and new ones get\nallocated at the same address. Note that this means we lose the nice\nproperty of constructing new cache entries only from cache key data,\nbut this is a better compromise than the previous buggy code.\n\nBug: b/197982536\nChange-Id: Ie75bb0e8df21ad25c2a7fed29adbf086fab072e3\nReviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/57168\nTested-by: Nicolas Capens \u003cnicolascapens@google.com\u003e\nKokoro-Result: kokoro \u003cnoreply+kokoro@google.com\u003e\nReviewed-by: Alexis Hétu \u003csugoi@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "43926f4e4b7b3ca2c62ba0b07f56307a7cb4fa76",
      "old_mode": 33188,
      "old_path": "src/Pipeline/ComputeProgram.cpp",
      "new_id": "ad946d0600e45b6ca6096a2802c5c8dea7f75eb0",
      "new_mode": 33188,
      "new_path": "src/Pipeline/ComputeProgram.cpp"
    },
    {
      "type": "modify",
      "old_id": "839f4948f861f07724e6c3bd3a4ca2a693ebbc3d",
      "old_mode": 33188,
      "old_path": "src/Pipeline/ComputeProgram.hpp",
      "new_id": "79a0bcbb7c0fb4a64a05cedde7a0b6296f741eeb",
      "new_mode": 33188,
      "new_path": "src/Pipeline/ComputeProgram.hpp"
    },
    {
      "type": "modify",
      "old_id": "8ab06d94a72f08ada7154ef7e05184235529ec7c",
      "old_mode": 33188,
      "old_path": "src/Vulkan/VkPipeline.cpp",
      "new_id": "aae21040cedc0d26da9a0ece86ea3dfcbfad7849",
      "new_mode": 33188,
      "new_path": "src/Vulkan/VkPipeline.cpp"
    },
    {
      "type": "modify",
      "old_id": "0aa72d6d0297af382941d69ea007b25f0904c26d",
      "old_mode": 33188,
      "old_path": "src/Vulkan/VkPipelineCache.cpp",
      "new_id": "dc4afe35f9fc504e07da54afd07617e56b106dae",
      "new_mode": 33188,
      "new_path": "src/Vulkan/VkPipelineCache.cpp"
    },
    {
      "type": "modify",
      "old_id": "933bfbf38cf3592b50f8d3cee94ab80f4a339e5b",
      "old_mode": 33188,
      "old_path": "src/Vulkan/VkPipelineCache.hpp",
      "new_id": "9c479e405be008da7a67f7a79d902f01327bbfb1",
      "new_mode": 33188,
      "new_path": "src/Vulkan/VkPipelineCache.hpp"
    }
  ]
}
