)]}'
{
  "commit": "e8cead16267e039304fc59766262b6b6d16ad4f2",
  "tree": "6591c904adc9a9b32e96aec00e0a61bedd65ad2d",
  "parents": [
    "70b6fd30f4c8f0bbdba04b6bb776ffb063bc8681"
  ],
  "author": {
    "name": "Ralf W. Grosse-Kunstleve",
    "email": "rwgkio@gmail.com",
    "time": "Sun Mar 29 22:03:41 2026 +0700"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "time": "Sun Mar 29 08:03:41 2026 -0700"
  },
  "message": "Harden `PYBIND11_MODULE_PYINIT` and `get_internals()` against crashes during module init (#6018)\n\n* Wrap ensure_internals() in try-catch in PYBIND11_MODULE_PYINIT\n\nPreviously, ensure_internals() was called without exception handling\nin the PyInit_* function (PYBIND11_MODULE_PYINIT), while the same call\nin PYBIND11_MODULE_EXEC was already wrapped in try-catch. On MSVC,\na C++ exception propagating through the extern \"C\" PyInit_* boundary\nis undefined behavior, which can manifest as an access violation\ninstead of a clean error message. This is a potential contributor to\ncrashes like gh-5993. Wrap the entire PyInit body in try/catch using\nthe existing PYBIND11_CATCH_INIT_EXCEPTIONS pattern.\n\nMade-with: Cursor\n\n* Add nullptr guards in get_internals() for better crash diagnostics\n\nAdd explicit null checks after get_pp() and create_pp_content_once()\nin get_internals(), calling pybind11_fail() with descriptive messages.\nThese guards convert potential null-pointer dereferences (which produce\nunhelpful access-violation crashes, especially on Windows) into clear\nruntime_error messages that can be caught and reported as ImportError\nby the try-catch added in the previous commit.\n\nMade-with: Cursor",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ebffe579a3664f5fafaf9e3442901ab2946d4d2d",
      "old_mode": 33188,
      "old_path": "include/pybind11/detail/common.h",
      "new_id": "d438f9c224b2b6183e87b408aff02fa388733773",
      "new_mode": 33188,
      "new_path": "include/pybind11/detail/common.h"
    },
    {
      "type": "modify",
      "old_id": "7edd00471af017f0f803040b85968a238032463b",
      "old_mode": 33188,
      "old_path": "include/pybind11/detail/internals.h",
      "new_id": "4175d20b215046628e65a3bd0e35c2ad93ee5ec5",
      "new_mode": 33188,
      "new_path": "include/pybind11/detail/internals.h"
    }
  ]
}
