Repository navigation
Conversation
_Py_make_parameters() uses only 48 bytes of C stack per level in a debug build on 32-bit ARM, so 150_000 nested lists fit in the 8 MiB stack of run_with_limited_c_stack() and no RecursionError is raised. Nest 500_000 levels, as other tests with small C frames do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On 32-bit ARM,
_Py_make_parameters()takes only 48 bytes of C stack per level in a debug build, so the 150,000 nested lists fit in the 8 MiB stack ofrun_with_limited_c_stack()and noRecursionErroris raised. The 3.14 release build and 3.15 still pass on armhf, but only just: they overflow at about 149,400 and 149,100 levels.This nests 500,000 levels instead, the same depth other tests with small C frames use (
test_exceptions,test_xml_etree,test_compile).I ran it with Debian sid's python3.14 and python3.15, debug and release, on amd64, i386, armhf, arm64, ppc64el, s390x and riscv64. Before this change it failed only with python3.14-dbg on armhf. With it, it passes on all of them. On the other architectures a level takes 80 bytes or more. I also ran test_typing from main and 3.14 source builds, debug (with
-R 3:3) and release, withulimit -sfrom 1 MiB to unlimited. The test's peak memory goes up by about 25 MB in a release build.The 3.14 backport will conflict in the import list, so I can do that one by hand.