)]}'
{
  "commit": "0413530655ec966e235cd862daa09bca166e4514",
  "tree": "b01deedb0f2892ef42cf55eaabb17549ba662d34",
  "parents": [
    "0ab973950366ba7853a894e21676b86fd6b53453"
  ],
  "author": {
    "name": "Marc Kupietz",
    "email": "kupietz@ids-mannheim.de",
    "time": "Thu Jul 30 14:40:02 2026 +0900"
  },
  "committer": {
    "name": "Marc Kupietz",
    "email": "kupietz@ids-mannheim.de",
    "time": "Thu Jul 30 14:40:02 2026 +0900"
  },
  "message": "Fix memory leaks in the request path\n\nEvery request leaked the target sum array (cutoff * sizeof(float), i.e. 2 MB\nat the default cutoff of 500000), the thread handle array, the target word\nlist and the collocator results of all window threads. getWordNumber() leaked\na word list on every word lookup, too.\n\nOn top of that every string and array returned from C to perl leaked: for a\nchar* return value Inline::C generates sv_setpv(), which copies the buffer but\nnever frees it, and for an AV* return value it generates newRV(), which leaves\nthe array behind with a reference count of one. All functions returning data\nto perl therefore return an SV* now and release their buffers.\n\ngetClassicCollocators() and getCollocationScores() leaked twice, because\nlibcollocatordb hands out strdup()ed strings that were strdup()ed again.\n\nAlso fixes crashes in the same code paths:\n- get_neighbours() divided by zero when called with nosp\u003d1\n- getPosWiseW2VCollocators() wrote before the start of its result buffer for\n  empty results, called malloc(0) for models without a syn layer and\n  dereferenced a NULL collocator result for multi word input starting with an\n  out of dictionary word\n- getBiggestMergedDifferences() sized its buffer for 50 bytes per record,\n  which is not enough for long words\n- getSimilarProfiles() wrote to buffer[-1] for empty profiles\n\nCo-Authored-By: Claude Opus 5 \u003cnoreply@anthropic.com\u003e\nChange-Id: Iff4215745f26156408a056de6d867753993082c2\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5ef2014d44707b762b10d5a8871e010476123492",
      "old_mode": 33188,
      "old_path": "lib/IDS/DeReKoVecs/derekovecs-server.c",
      "new_id": "e4cc096dbf8f667d421072269dc70bb5f57aa8eb",
      "new_mode": 33188,
      "new_path": "lib/IDS/DeReKoVecs/derekovecs-server.c"
    }
  ]
}
