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
439c25eb
Kaydet (Commit)
439c25eb
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
dcdc3ef5
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 @
439c25eb
...
@@ -140,6 +140,14 @@ class Callbacks(unittest.TestCase):
...
@@ -140,6 +140,14 @@ class Callbacks(unittest.TestCase):
if
isinstance
(
x
,
X
)]
if
isinstance
(
x
,
X
)]
self
.
assertEqual
(
len
(
live
),
0
)
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
:
try
:
WINFUNCTYPE
WINFUNCTYPE
except
NameError
:
except
NameError
:
...
...
Misc/NEWS
Dosyayı görüntüle @
439c25eb
...
@@ -192,6 +192,9 @@ Library
...
@@ -192,6 +192,9 @@ Library
Extension
Modules
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
-
Issue
#
12950
:
Fix
passing
file
descriptors
in
multiprocessing
,
under
OpenIndiana
/
Illumos
.
OpenIndiana
/
Illumos
.
...
...
Modules/_ctypes/callbacks.c
Dosyayı görüntüle @
439c25eb
...
@@ -18,6 +18,7 @@ static void
...
@@ -18,6 +18,7 @@ static void
CThunkObject_dealloc
(
PyObject
*
_self
)
CThunkObject_dealloc
(
PyObject
*
_self
)
{
{
CThunkObject
*
self
=
(
CThunkObject
*
)
_self
;
CThunkObject
*
self
=
(
CThunkObject
*
)
_self
;
PyObject_GC_UnTrack
(
self
);
Py_XDECREF
(
self
->
converters
);
Py_XDECREF
(
self
->
converters
);
Py_XDECREF
(
self
->
callable
);
Py_XDECREF
(
self
->
callable
);
Py_XDECREF
(
self
->
restype
);
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