# Bug report ### Bug description: ## Summary 1.code_dealloc (line 2550, Py_GIL_DISABLED only): co->co_tlbc->size accessed without NULL check when init_code fails on _PyCodeArray_New → segfault. 2._PyCode_New (line 741-743): replacement_locations not DECREF'd when init_code fails. This is a sub-issue of https://github.com/python/cpython/issues/146102 with [gist details](https://gist.github.com/devdanzin/768b5163f0f743bd940c5d96ca9e9981) ### CPython versions tested on: CPython main branch ### Operating systems tested on: Windows <!-- gh-linked-prs --> ### Linked PRs * gh-150549 <!-- /gh-linked-prs -->
Activity
gh-150546: Fix cleanup for replacement_locations in _PyCode_New() (#1…
pythongh-150546: Fix cleanup for replacement_locations in _PyCode_New…