mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #14231: Lib/test/crashers/borrowed_ref_1.py was fixed by ba6376dff6c4.
This commit is contained in:
parent
865756a94c
commit
63ed5664a1
1 changed files with 0 additions and 29 deletions
|
|
@ -1,29 +0,0 @@
|
|||
"""
|
||||
_PyType_Lookup() returns a borrowed reference.
|
||||
This attacks the call in dictobject.c.
|
||||
"""
|
||||
|
||||
class A(object):
|
||||
pass
|
||||
|
||||
class B(object):
|
||||
def __del__(self):
|
||||
print('hi')
|
||||
del D.__missing__
|
||||
|
||||
class D(dict):
|
||||
class __missing__:
|
||||
def __init__(self, *args):
|
||||
pass
|
||||
|
||||
|
||||
d = D()
|
||||
a = A()
|
||||
a.cycle = a
|
||||
a.other = B()
|
||||
del a
|
||||
|
||||
prev = None
|
||||
while 1:
|
||||
d[5]
|
||||
prev = (prev,)
|
||||
Loading…
Add table
Add a link
Reference in a new issue