tests: lower test_elif_deep depth from 1000 to 100#2146
Open
amaanq wants to merge 1 commit intopallets:mainfrom
Open
tests: lower test_elif_deep depth from 1000 to 100#2146amaanq wants to merge 1 commit intopallets:mainfrom
amaanq wants to merge 1 commit intopallets:mainfrom
Conversation
The flat `elif` codegen (pallets#759) is unconditional, so even a handful of branches exercises the codepath. On s390x, CPython sets `Py_C_RECURSION_LIMIT` to just 800 because the z/Architecture ABI requires a 160-byte register save area per call frame, roughly 10x what x86_64 needs, which makes 1000 nested branches overflow `compile()` with a `RecursionError`. Lowering to 100 still thoroughly exercises the flat elif codepath while staying within all platform limits.
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.
The flat
elifcodegen (#759) is unconditional, so even a handful of branches exercises the codepath. On s390x, CPython setsPy_C_RECURSION_LIMITto just 800 because the z/Architecture ABI requires a 160-byte register save area per call frame, roughly 10x what x86_64 needs, which makes 1000 nested branches overflowcompile()with aRecursionError. Lowering to 100 still thoroughly exercises the flat elif codepath while staying within all platform limits.test_elif_deepfails on s390x withRecursionError#2145