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

sys.settrace and sys.setprofile are not re-entrant #94510

Closed
pablogsal opened this issue Jul 2, 2022 · 1 comment
Closed

sys.settrace and sys.setprofile are not re-entrant #94510

pablogsal opened this issue Jul 2, 2022 · 1 comment

Comments

@pablogsal
Copy link
Member

@pablogsal pablogsal commented Jul 2, 2022

The code that sets trace and profile functions is not re-entrant. We are leaking objects if removing a profile/trace functions triggers a re-entrant call.

We should raise in this case.

@pablogsal pablogsal changed the title sys.settrace is not re-entrant sys.settrace and sys.setprofile are not re-entrant Jul 2, 2022
pablogsal added a commit to pablogsal/cpython that referenced this issue Jul 2, 2022
ambv added a commit that referenced this issue Jul 5, 2022
ambv pushed a commit to ambv/cpython that referenced this issue Jul 5, 2022
…d sys.settrace (pythonGH-94511)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 40d81fd)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit to pablogsal/cpython that referenced this issue Jul 5, 2022
…d sys.settrace (pythonGH-94511)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 40d81fd)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
ambv pushed a commit to ambv/cpython that referenced this issue Jul 5, 2022
…d sys.settrace (pythonGH-94511)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 40d81fd)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit to pablogsal/cpython that referenced this issue Jul 5, 2022
…d sys.settrace (pythonGH-94511)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
(cherry picked from commit 40d81fd)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit that referenced this issue Jul 5, 2022
…ettrace (GH-94511) (#94579)

Co-authored-by: Łukasz Langa <lukasz@langa.pl>.
Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
ambv added a commit that referenced this issue Jul 5, 2022
…settrace (GH-94511) (GH-94578)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
Co-authored-by: Łukasz Langa <lukasz@langa.pl>
(cherry picked from commit 40d81fd)
@ambv
Copy link
Contributor

@ambv ambv commented Jul 5, 2022

This is now fixed in 3.10 - 3.12. Thanks, Pablo! 🍰

@ambv ambv closed this as completed Jul 5, 2022
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

No branches or pull requests

2 participants