Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[3.14] GH-139653: Only raise an exception (or fatal error) when the stack pointer is about to overflow the stack. (GH-141711)#141892

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Closed
hroncok wants to merge4 commits intopython:3.14fromhroncok:backport-7094f09-3.14

Conversation

@hroncok
Copy link
Contributor

@hroncokhroncok commentedNov 24, 2025
edited by github-actionsbot
Loading

This is my naïve attempt to backport#141711 into the 3.14 branch. I needed to backport several other changes, and at this point am frankly not sure if I know what I am doing :)

Opening as a draft, nevertheless, in case someone wants to take a look.


📚 Documentation preview 📚:https://cpython-previews--141892.org.readthedocs.build/

rokmand others added4 commitsNovember 24, 2025 11:32
… limit on macOS (pythonGH-139232)Use `pthread_get_stackaddr_np()` and `pthread_get_stacksize_np()` to determine the stack address and size.(cherry picked from commit7016044)
…hon#139668)Add PyUnstable_ThreadState_SetStackProtection() andPyUnstable_ThreadState_ResetStackProtection() functionsto set the stack base address and stack size of a Pythonthread state.Co-authored-by: Petr Viktorin <encukou@gmail.com>(cherry picked from commitb99db92)
…ack pointer is about to overflow the stack. (pythonGH-141711)Only raises if the stack pointer is both below the limit *and* above the stack base.This prevents false positives for user-space threads, as the stack pointer will be outside those boundsif the stack has been swapped.(cherry picked from commitc25a070)
@vstinner
Copy link
Member

@encukou prepared#141661 which contains most changes of this PR but fix also the ABI checks.

@hroncok
Copy link
ContributorAuthor

hroncok commentedNov 24, 2025
edited
Loading

I am not sure it includes theOnly raise an exception (or fatal error) when the stack pointer is about to overflow the stack commit, but I am happy to close this and finish the work there.

@vstinner
Copy link
Member

Sure, "Only raise an exception (or fatal error) when the stack pointer is about to overflow the stack" should still be backported. But#141661 is a complex backport for the first part: backport PyUnstable_ThreadState_SetStackProtection() functions and commits preparing this backport.

hroncok reacted with thumbs up emoji

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently will be requested when the pull request is marked ready for reviewericsnowcurrently is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon will be requested when the pull request is marked ready for reviewmarkshannon is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@hroncok@vstinner@rokm@markshannon

[8]ページ先頭

©2009-2025 Movatter.jp