File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -134,6 +134,14 @@ def __init__(self):
134134 if isinstance (x , X )]
135135 self .assertEqual (len (live ), 0 )
136136
137+ def test_issue12483 (self ):
138+ import gc
139+ class Nasty :
140+ def __del__ (self ):
141+ gc .collect ()
142+ CFUNCTYPE (None )(lambda x = Nasty (): None )
143+
144+
137145try :
138146 WINFUNCTYPE
139147except NameError :
Original file line number Diff line number Diff line change 6565Extension Modules
6666-----------------
6767
68+ - Issue #12483: ctypes: Fix a crash when the destruction of a callback
69+ object triggers the garbage collector.
70+
6871- Issue #12950: Fix passing file descriptors in multiprocessing, under
6972 OpenIndiana/Illumos.
7073
Original file line number Diff line number Diff line change @@ -13,6 +13,7 @@ static void
1313CThunkObject_dealloc (PyObject * _self )
1414{
1515 CThunkObject * self = (CThunkObject * )_self ;
16+ PyObject_GC_UnTrack (self );
1617 Py_XDECREF (self -> converters );
1718 Py_XDECREF (self -> callable );
1819 Py_XDECREF (self -> restype );
You can’t perform that action at this time.
0 commit comments