)]}'
{
  "commit": "194232e2bc87e17276cb22958a3364c62e2e0101",
  "tree": "be0c354c1b88cd77969b3d17424733ea0dffaa45",
  "parents": [
    "3490eff6f52ed0a87d8a2c1a1830770ee06848cc"
  ],
  "author": {
    "name": "Christopher Wellons",
    "email": "wellons@nullprogram.com",
    "time": "Thu Apr 09 12:08:00 2026 -0400"
  },
  "committer": {
    "name": "Christopher Wellons",
    "email": "wellons@nullprogram.com",
    "time": "Thu Apr 09 13:20:45 2026 -0400"
  },
  "message": "debugger: handle read errors on POSIX pipe and test abrupt disconnect\n\nThe POSIX pipe read wrappers stored the return of ::read() into an\nunsigned result, so a negative count (e.g. EBADF from a concurrent\nclose on another thread) became SIZE_MAX. ContentReader::buffer()\nwould then try to grow its deque by ~18 exabytes and crash with\neither std::length_error (glibc) or a stack smash (libc++). Treat\nany non-positive ::read() return as EOF/error, close the pipe, and\nreturn 0 so the peer\u0027s SessionThread observes a clean empty payload.\n\ncmDebuggerPipeClient is test-only infrastructure; production cmake\nis always the pipe server. Production close() assumes sequential\naccess, which holds in normal use (the adapter destructor joins\nSessionThread before closing the connection). The new abrupt-\ndisconnect test however needs to wake a sibling thread blocked in\nread() on the same fd, which Linux ::close() does not do.\n\nAdd a ShutdownForTesting() method that calls shutdown(SHUT_RDWR)\nwithout freeing the fd, so any concurrent blocking read wakes\nwith a clean zero-length return. On Windows, CloseHandle already\ncancels pending overlapped I/O, so the helper just forwards to\nclose(). Use it from testProtocolWithPipesAbruptDisconnect in\nplace of close().\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ac5fd0482826acd5e27bda41de062bf0d7d6b65b",
      "old_mode": 33188,
      "old_path": "Source/cmDebuggerPosixPipeConnection.cxx",
      "new_id": "e4572fa509c87750e9bf5d8b1e67e7ae6724fd4b",
      "new_mode": 33188,
      "new_path": "Source/cmDebuggerPosixPipeConnection.cxx"
    },
    {
      "type": "modify",
      "old_id": "98e3f6f2649a3f55301ed55d37a9c81cb0eba58d",
      "old_mode": 33188,
      "old_path": "Source/cmDebuggerPosixPipeConnection.h",
      "new_id": "d1e09d64e2e01db49f7d2f048d7e1c8c0a495430",
      "new_mode": 33188,
      "new_path": "Source/cmDebuggerPosixPipeConnection.h"
    },
    {
      "type": "modify",
      "old_id": "5611255a4524ccd90590079c59d114fb3375d08d",
      "old_mode": 33188,
      "old_path": "Source/cmDebuggerWindowsPipeConnection.h",
      "new_id": "dad23fba12ce6588090774889bfe78ed1bb28ec6",
      "new_mode": 33188,
      "new_path": "Source/cmDebuggerWindowsPipeConnection.h"
    },
    {
      "type": "modify",
      "old_id": "92ea047e7461afd7afed636ad170f88750b24ef7",
      "old_mode": 33188,
      "old_path": "Tests/CMakeLib/testDebuggerAdapterPipe.cxx",
      "new_id": "a7af6e8c5f31ccf111f3c3fda42777b7819b40d7",
      "new_mode": 33188,
      "new_path": "Tests/CMakeLib/testDebuggerAdapterPipe.cxx"
    }
  ]
}
