Skip to content

gh-110514: Add PY_THROW to sys.setprofile events #110524

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 2 commits into from
Oct 9, 2023

Conversation

gaogaotiantian
Copy link
Member

@gaogaotiantian gaogaotiantian commented Oct 8, 2023

sys.setprofile suffers the same issue as #106161 - it does not record PY_THROW events. So when the generator is garbage collected, the count is wrong.

For profile module, that means an assertion is raised.

This needs backporting.

@gaogaotiantian gaogaotiantian added 3.12 only security fixes 3.13 bugs and security fixes needs backport to 3.12 only security fixes and removed 3.12 only security fixes 3.13 bugs and security fixes labels Oct 8, 2023
@markshannon
Copy link
Member

Thanks, looks good.

@markshannon markshannon merged commit dd4bb05 into python:main Oct 9, 2023
@miss-islington
Copy link
Contributor

Thanks @gaogaotiantian for the PR, and @markshannon for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 9, 2023
…0524)

(cherry picked from commit dd4bb05)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 9, 2023

GH-110541 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 9, 2023
Yhg1s pushed a commit that referenced this pull request Oct 9, 2023
…#110541)

gh-110514: Add PY_THROW to `sys.setprofile` events (GH-110524)
(cherry picked from commit dd4bb05)

Co-authored-by: Tian Gao <gaogaotiantian@hotmail.com>
@gaogaotiantian gaogaotiantian deleted the sys-profile-throw branch October 9, 2023 17:51
Glyphack pushed a commit to Glyphack/cpython that referenced this pull request Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants