Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-91079: Raise recursion error on C stack overflow, instead of crashing. #96466

Closed
wants to merge 15 commits into from

Conversation

markshannon
Copy link
Member

@markshannon markshannon commented Aug 31, 2022

This is the first stage in implementing #91079.
It does not ask the O/S for stack size, instead using a fixed stack size of 100k words (800k bytes for 64 bit machines, 400k bytes for 32 bit machines).

This provides a base implementation for platforms other than the main three or four.

Full stack support for the major platforms will be added in subsequent PRs.

@markshannon markshannon changed the title Raise recursion error on C stack overflow, instead of crashing. GH-91079: Raise recursion error on C stack overflow, instead of crashing. Aug 31, 2022
@markshannon
Copy link
Member Author

This approach is proving somewhat problematic.
I'm going back to using a counter, but having two counters: one for the Python recursion, and the other for C stack consumption.
We can then drop the C counter for platforms that allow us to probe the C stack.

@markshannon markshannon closed this Sep 2, 2022
@markshannon markshannon deleted the stack-overflow branch September 26, 2023 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants