)]}'
{
  "commit": "4eb384e1341d2999f21a6cfb222f3fd0de0a64b7",
  "tree": "561964ffe43f4f3f377cfb50466346689c8d6e3f",
  "parents": [
    "34d315a55b42abec66815c945b5cbda27259fe77"
  ],
  "author": {
    "name": "Kai Ninomiya",
    "email": "kainino@chromium.org",
    "time": "Thu Jul 31 14:26:32 2025 -0700"
  },
  "committer": {
    "name": "Dawn LUCI CQ",
    "email": "dawn-scoped@luci-project-accounts.iam.gserviceaccount.com",
    "time": "Thu Jul 31 14:26:32 2025 -0700"
  },
  "message": "[emscripten] Fix memory management of WGPUCompilationInfo\n\nlibrary_webgpu.js would allocate space for WGPUCompilationMessages and\ntheir strings and Utf16 chain structs, even if there were no messages.\nFix library_webgpu.js and webgpu.cpp so they\u0027re in sync about when they\nneed to malloc/free.\n\n- Fixes a UB crash when trying to access messages[0] to free the Utf16\n  chain but there isn\u0027t actually a messages[0] at all. (This is only\n  caught by the test in ASAN builds.)\n- Fixes a leak of the string allocation when there is no messages[0] so\n  the freeing code can\u0027t get the pointer to free. (This is definitely a\n  leak because we always allocate at least one byte. The other two\n  allocations may also have leaked, but their allocation sizes were 0.)\n\nTangentially, add -sSAFE_HEAP to debug builds (though this does not\ncatch the bug, that requires a real ASAN build).\n\nFixed: 429140232\nChange-Id: Iab2f11e4cbceaa568a7c6633e2501dc3bbb1ce87\nReviewed-on: https://dawn-review.googlesource.com/c/dawn/+/255497\nReviewed-by: Loko Kung \u003clokokung@google.com\u003e\nCommit-Queue: Kai Ninomiya \u003ckainino@chromium.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a94f6e2baf7c15b0e2c6eb2ddc75c08bbb679baf",
      "old_mode": 33188,
      "old_path": "src/emdawnwebgpu/CMakeLists.txt",
      "new_id": "cd741c3d0ea6e46e89269480cd11a203e331662a",
      "new_mode": 33188,
      "new_path": "src/emdawnwebgpu/CMakeLists.txt"
    },
    {
      "type": "modify",
      "old_id": "394de0091605516d0f95d6e9f86bdbd82224a1d9",
      "old_mode": 33188,
      "old_path": "src/emdawnwebgpu/tests/SpotTests.cpp",
      "new_id": "59e7a163c613cffc212af1c7bc78da15d0177b2c",
      "new_mode": 33188,
      "new_path": "src/emdawnwebgpu/tests/SpotTests.cpp"
    },
    {
      "type": "modify",
      "old_id": "c43eed25abd7182d4d222f9cdd814a2d1ae8cd26",
      "old_mode": 33188,
      "old_path": "third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js",
      "new_id": "68adc1d63b586fc55c8a24609b463b6bfcdc98fa",
      "new_mode": 33188,
      "new_path": "third_party/emdawnwebgpu/pkg/webgpu/src/library_webgpu.js"
    },
    {
      "type": "modify",
      "old_id": "e9747d756e2a5ef3d6289a0c51318688d0514962",
      "old_mode": 33188,
      "old_path": "third_party/emdawnwebgpu/pkg/webgpu/src/webgpu.cpp",
      "new_id": "19edd14547c179ce7bc1458fce6e0498cce445f1",
      "new_mode": 33188,
      "new_path": "third_party/emdawnwebgpu/pkg/webgpu/src/webgpu.cpp"
    }
  ]
}
