[3.12] GH-107263: Increase C stack limit for most functions, except _PyEval_EvalFrameDefault() (GH-107535) (#107618)

GH-107263: Increase C stack limit for most functions, except `_PyEval_EvalFrameDefault()` (GH-107535)

* Set C recursion limit to 1500, set cost of eval loop to 2 frames, and compiler mutliply to 2.
(cherry picked from commit fa45958450)

Co-authored-by: Mark Shannon <mark@hotpy.org>
This commit is contained in:
Miss Islington (bot) 2023-08-04 03:25:51 -07:00 committed by GitHub
parent 58af2293c5
commit 98902d6c05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 57 additions and 45 deletions

View file

@ -2,6 +2,7 @@
import unittest
import collections
import sys
from test.support import C_RECURSION_LIMIT
class BasicTestMappingProtocol(unittest.TestCase):
@ -624,7 +625,7 @@ class TestHashMappingProtocol(TestMappingProtocol):
def test_repr_deep(self):
d = self._empty_mapping()
for i in range(sys.getrecursionlimit() + 100):
for i in range(C_RECURSION_LIMIT + 1):
d0 = d
d = self._empty_mapping()
d[1] = d0