-
-
Notifications
You must be signed in to change notification settings - Fork 32k
GH-91079: Implement C stack limits using addresses, not counters. #130007
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
fc910a3
Hide that C recursion protection is implemented with a counter. There…
markshannon afeb866
Implement C recursion protection with limit pointers
markshannon 22ca169
Use uintptr_t instead of char * to avoid warnings and UB
markshannon e8d8c4b
Merge branch 'main' into c-recursion-limit
markshannon b3638a5
Fix typo and update stable ABI
markshannon 774efb5
Tweak AST test numbers
markshannon 151c88f
Improve logic handling trial C stack overflow
markshannon 350f8ec
Remove calls to PyOS_CheckStack
markshannon 428c46a
Up the limits for recursion tests
markshannon a9be141
Use deeper stack for test
markshannon 03fc52e
Remove exceeds_recursion_limit and get_c_recursion_limit. Use platfor…
markshannon afac1e6
Do fewer probes when growing stack limit
markshannon 9da904d
Tweak depths
markshannon a802ff6
Merge branch 'main' into c-recursion-limit
markshannon dbcf6f0
Perform lazy initialization of c recursion check
markshannon 2cc3287
Post merge fixup
markshannon e697926
Up depth again
markshannon f8a9143
8000
Drop 'failing' depth
markshannon 7d6d77f
Add news
markshannon 31a83dc
Increase headroom
markshannon 47c50aa
Update test
markshannon 495c4ea
Tweak some more thresholds and tests
markshannon 9e0cc67
Add stack protection to parser
markshannon 857a7bb
Make tests more robust to low stacks
markshannon 9c9326a
Improve error messages for stack overflow
markshannon 75d3219
Merge branch 'main' into c-recursion-limit
markshannon 3e41b46
Fix formatting
markshannon 158401a
Halve size of WASI stack
markshannon c1eb229
Reduce webassembly 'stack size' by 10
markshannon 7407d2b
Halve size of WASI stack, again
markshannon 978b5e7
Change WASI stack back to 100k
markshannon 7b36f59
Add many skip tests for WASI due to stack issues
markshannon 5e5db03
Probe all pages when extending stack limits
markshannon 82173ed
Fix compiler warnings
markshannon 64cfd86
Use GetCurrentThreadStackLimits instead of probing with alloca
markshannon e52137f
Refactor a bit
markshannon 704c336
Merge branch 'main' into c-recursion-limit
markshannon 21366c3
Fix logic error in test
markshannon 7761d31
Make ABI function needed for Py_TRASHCAN_BEGIN private
markshannon b067e3e
Move new fields to _PyThreadStateImpl to avoid any potential API brea…
markshannon b0e695f
Fix missing cast
markshannon c4cd68f
yet another missing _
markshannon 9654790
Tidy up a bit
markshannon 2cef96f
Restore use of exceeds_recursion_limit
markshannon c5d8a40
Address remaining review comments
markshannon 33e11c8
Merge branch 'main' into c-recursion-limit
markshannon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Probe all pages when extending stack limits
- Loading branch information
commit 5e5db03e7f72497cccfbe15bf16c16b2d73f15cc
There are no files selected for viewing
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
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
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
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
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
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.