@@ -3810,8 +3810,7 @@ class TestFrameChainLimits(RemoteInspectionTestBase):
38103810
38113811 # Limits plus one, to exceed them (must match MAX_FRAME_CHAIN_DEPTH /
38123812 # MAX_TASK_WAITER_CHAIN_DEPTH from _remote_debugging.h)
3813- CHAIN_DEPTH = 1024 + 512 + 1
3814-
3813+ FRAME_CHAIN_DEPTH = 1024 + 512 + 1
38153814 TASK_WAITER_CHAIN_DEPTH = 256 + 1
38163815
38173816 def _assert_unwinder_limit_error (self , unwind , expected_substring ):
@@ -3848,7 +3847,7 @@ def test_get_stack_trace_deep_frame_chain_aborts(self):
38483847 synchronous stack walk instead of walking it indefinitely."""
38493848 script_body = f"""\
38503849 import sys
3851- sys.setrecursionlimit({ self .CHAIN_DEPTH * 2 } )
3850+ sys.setrecursionlimit({ self .FRAME_CHAIN_DEPTH * 2 } )
38523851
38533852 def recurse(n):
38543853 if n <= 0:
@@ -3857,7 +3856,7 @@ def recurse(n):
38573856 return
38583857 recurse(n - 1)
38593858
3860- recurse({ self .CHAIN_DEPTH } )
3859+ recurse({ self .FRAME_CHAIN_DEPTH } )
38613860 """
38623861 with self ._target_process (script_body ) as (p , client_socket , _ ):
38633862 _wait_for_signal (client_socket , b"ready" )
@@ -3907,7 +3906,7 @@ def test_get_async_stack_trace_deep_frame_chain_aborts(self):
39073906 stack walk instead of walking it indefinitely."""
39083907 script_body = f"""\
39093908 import sys, asyncio
3910- sys.setrecursionlimit({ self .CHAIN_DEPTH * 2 } )
3909+ sys.setrecursionlimit({ self .FRAME_CHAIN_DEPTH * 2 } )
39113910
39123911 def recurse(n):
39133912 if n <= 0:
@@ -3917,7 +3916,7 @@ def recurse(n):
39173916 recurse(n - 1)
39183917
39193918 async def deep():
3920- recurse({ self .CHAIN_DEPTH } )
3919+ recurse({ self .FRAME_CHAIN_DEPTH } )
39213920
39223921 asyncio.run(deep())
39233922 """
@@ -3939,7 +3938,7 @@ def test_get_all_awaited_by_deep_coro_chain_aborts(self):
39393938 the walk instead of overflowing the C stack."""
39403939 script_body = f"""\
39413940 import sys, asyncio
3942- sys.setrecursionlimit({ self .CHAIN_DEPTH * 2 } )
3941+ sys.setrecursionlimit({ self .FRAME_CHAIN_DEPTH * 2 } )
39433942
39443943 async def chain(n):
39453944 if n <= 0:
@@ -3948,7 +3947,7 @@ async def chain(n):
39483947 await chain(n - 1)
39493948
39503949 async def main():
3951- task = asyncio.create_task(chain({ self .CHAIN_DEPTH } ))
3950+ task = asyncio.create_task(chain({ self .FRAME_CHAIN_DEPTH } ))
39523951 await asyncio.sleep(0)
39533952 sock.sendall(b"ready")
39543953 await task
0 commit comments