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
d77ef8fa
Kaydet (Commit)
d77ef8fa
authored
Haz 28, 2006
tarafından
Armin Rigo
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
A couple of crashers of the "won't fix" kind.
üst
999a336a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
0 deletions
+26
-0
bogus_code_obj.py
Lib/test/crashers/bogus_code_obj.py
+9
-0
gc_inspection.py
Lib/test/crashers/gc_inspection.py
+17
-0
No files found.
Lib/test/crashers/bogus_code_obj.py
0 → 100644
Dosyayı görüntüle @
d77ef8fa
"""
Broken bytecode objects can easily crash the interpreter.
"""
import
types
co
=
types
.
CodeType
(
0
,
0
,
0
,
0
,
'
\x04\x71\x00\x00
'
,
(),
(),
(),
''
,
''
,
1
,
''
)
exec
co
Lib/test/crashers/gc_inspection.py
0 → 100644
Dosyayı görüntüle @
d77ef8fa
"""
gc.get_referrers() can be used to see objects before they are fully built.
"""
import
gc
def
g
():
marker
=
object
()
yield
marker
# now the marker is in the tuple being constructed
[
tup
]
=
[
x
for
x
in
gc
.
get_referrers
(
marker
)
if
type
(
x
)
is
tuple
]
print
tup
print
tup
[
1
]
tuple
(
g
())
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