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: Add PyUnstable_ThreadState_SetStackProtection() (GH-139668)#141661

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

Merged
encukou merged 9 commits intopython:3.14fromencukou:backport-b99db92-3.14
Nov 25, 2025

Conversation

@encukou
rokmand others added5 commitsNovember 17, 2025 14:16
… limit on macOS (pythonGH-139232)Use `pthread_get_stackaddr_np()` and `pthread_get_stacksize_np()` to determine the stack address and size.
…honGH-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>
…pythonGH-141551)These checks were invalid and failed randomly on FreeBSDand Alpine Linux.
@encukouencukou changed the titlegh-139653: Add PyUnstable_ThreadState_SetStackProtection() (GH-139668)[3.14] gh-139653: Add PyUnstable_ThreadState_SetStackProtection() (GH-139668)Nov 17, 2025
@encukouencukou requested a review fromhugovkNovember 17, 2025 13:50
@encukou
Copy link
MemberAuthor

@hugovk, this will change the internal ABI.

@vstinner
Copy link
Member

I would prefer to wait to see how the discussionhttps://discuss.python.org/t/python-3-14-0-is-incompatible-with-stack-switching-systems-what-do-we-do/104880 goes and see if this API solves the issue, or if we need another solution.

@vstinner
Copy link
Member

If this API cannot be used by most projects and abetter fix can be designed, I would even suggest to remove this API from the main branch.

@vstinner
Copy link
Member

#141404 has been merged causing conflicts.

Can you please update your PR to solve conflicts?

@vstinner
Copy link
Member

I would prefer to wait to see how the discussionhttps://discuss.python.org/t/python-3-14-0-is-incompatible-with-stack-switching-systems-what-do-we-do/104880 goes and see if this API solves the issue, or if we need another solution.

If this API cannot be used by most projects and abetter fix can be designed, I would even suggest to remove this API from the main branch.

#141711 has been merged: it should fix#139653 for most impacted projects. But according to@markshannon,PyUnstable_ThreadState_SetStackProtection() remains useful for these projects. So let's backport this function to the 3.14 branch.

Copy link
Member

@vstinnervstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

LGTM

@encukouencukou merged commit32a38a2 intopython:3.14Nov 25, 2025
57 checks passed
@encukouencukou deleted the backport-b99db92-3.14 branchNovember 25, 2025 13:21
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@vstinnervstinnervstinner approved these changes

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

@hugovkhugovkAwaiting requested review from hugovk

Assignees

No one assigned

Projects

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@encukou@vstinner@rokm@markshannon

[8]ページ先頭

©2009-2025 Movatter.jp