mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Put method-wrappers into trashcan. Fixes #927248.
This commit is contained in:
parent
ede77f5373
commit
d5cfa5491a
3 changed files with 14 additions and 1 deletions
|
|
@ -3966,6 +3966,13 @@ def weakref_segfault():
|
|||
o.whatever = Provoker(o)
|
||||
del o
|
||||
|
||||
def wrapper_segfault():
|
||||
# SF 927248: deeply nested wrappers could cause stack overflow
|
||||
f = lambda:None
|
||||
for i in xrange(1000000):
|
||||
f = f.__call__
|
||||
f = None
|
||||
|
||||
# Fix SF #762455, segfault when sys.stdout is changed in getattr
|
||||
def filefault():
|
||||
if verbose:
|
||||
|
|
@ -4121,6 +4128,7 @@ def notimplemented():
|
|||
|
||||
def test_main():
|
||||
weakref_segfault() # Must be first, somehow
|
||||
wrapper_segfault()
|
||||
do_this_first()
|
||||
class_docstrings()
|
||||
lists()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue