gh-142317: Do not set a stack size for cpython on MacOS#150170
Draft
boomanaiden154 wants to merge 1 commit into
Draft
gh-142317: Do not set a stack size for cpython on MacOS#150170boomanaiden154 wants to merge 1 commit into
boomanaiden154 wants to merge 1 commit into
Conversation
We were originally setting a stack size beyond the default limit to allow the interpreter to hit the default recursion limit after some MacOS changes made it no longer possible to actually use RLIMIT_STACK to adjust the default stack size. 5bbbc73 was the commit implenting that. However, we no longer need extra stack space to hit the default recursion limit after B4903afd4debbbd71dc49a2c8fefa74a3b6c6832. Given that setting the default stack size prevents setting RLIMIT_STACK in other circumstances where it would be useful (e.g., inside of LLVM's integrated tester where we want to emulate ulimit), and that it is no longer necessary to achieve the stated goal, do not set the stack size and set the thread stack size limit to the platform default to match what we were doing before. Fixes python#142317.
Author
|
Looks like there are CI failures that I did not see locally initially... |
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.
We were originally setting a stack size beyond the default limit to allow the interpreter to hit the default recursion limit after some MacOS changes made it no longer possible to actually use RLIMIT_STACK to adjust the default stack size. 5bbbc73 was the commit implenting that.
However, we no longer need extra stack space to hit the default recursion limit after B4903afd4debbbd71dc49a2c8fefa74a3b6c6832.
Given that setting the default stack size prevents setting RLIMIT_STACK in other circumstances where it would be useful (e.g., inside of LLVM's integrated tester where we want to emulate ulimit), and that it is no longer necessary to achieve the stated goal, do not set the stack size and set the thread stack size limit to the platform default to match what we were doing before.
I've added a simple regression test that ensures we can call
setrlimitwithresource.RLIMIT_STACKat all.Fixes #142317.