Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.4k
Closed
Description
Bug report
This came up while testing numpy on 3.12. A bug report has been filed onnumpy/numpy#23766. It's happening due to#103912, which introducedan additional check fortp_bases
not being NULL intype_ready_set_bases
, which is called fromPyType_Ready
.
numpy setstp_bases
manually before callingPyType_Ready
, which means that the afore-mentioned check succeeds, and so,the line that setsob_type
does not get executed (it used to before#103912), which leads to a segmentation faultlater on, when trying to setmro
.
This looks like a bug, but I'm not sure whether that's expected and numpy should be adjusted. If the latter is true, should a note be added in theWhat's new
document?
Linked PRs
- gh-104614: Make Sure ob_type is Always Set Correctly by PyType_Ready() #105122
- [3.12] gh-104614: Make Sure ob_type is Always Set Correctly by PyType_Ready() (gh-105122) #105211
- gh-104614: Fix potential ref. leak in _testcapimodule/get_basic_static_type() #105225
- [3.12] gh-104614: Fix potential ref. leak in _testcapimodule/get_basic_static_type() (GH-105225) #105248