Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
bbe46d63
Kaydet (Commit)
bbe46d63
authored
Eyl 12, 2011
tarafından
Amaury Forgeot d'Arc
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
üst
1d7deafe
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
0 deletions
+12
-0
test_callbacks.py
Lib/ctypes/test/test_callbacks.py
+8
-0
NEWS
Misc/NEWS
+3
-0
callbacks.c
Modules/_ctypes/callbacks.c
+1
-0
No files found.
Lib/ctypes/test/test_callbacks.py
Dosyayı görüntüle @
bbe46d63
...
...
@@ -134,6 +134,14 @@ class Callbacks(unittest.TestCase):
if
isinstance
(
x
,
X
)]
self
.
assertEqual
(
len
(
live
),
0
)
def
test_issue12483
(
self
):
import
gc
class
Nasty
:
def
__del__
(
self
):
gc
.
collect
()
CFUNCTYPE
(
None
)(
lambda
x
=
Nasty
():
None
)
try
:
WINFUNCTYPE
except
NameError
:
...
...
Misc/NEWS
Dosyayı görüntüle @
bbe46d63
...
...
@@ -65,6 +65,9 @@ Tests
Extension Modules
-----------------
- Issue #12483: ctypes: Fix a crash when the destruction of a callback
object triggers the garbage collector.
- Issue #12950: Fix passing file descriptors in multiprocessing, under
OpenIndiana/Illumos.
...
...
Modules/_ctypes/callbacks.c
Dosyayı görüntüle @
bbe46d63
...
...
@@ -13,6 +13,7 @@ static void
CThunkObject_dealloc
(
PyObject
*
_self
)
{
CThunkObject
*
self
=
(
CThunkObject
*
)
_self
;
PyObject_GC_UnTrack
(
self
);
Py_XDECREF
(
self
->
converters
);
Py_XDECREF
(
self
->
callable
);
Py_XDECREF
(
self
->
restype
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment