Skip to content

gh-111132: Fix crash on interactive_filename in run_mod #111136

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 20, 2023

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Oct 20, 2023

Here's what happens (at least in my understanding): we only change interactive_filename to a new object if interactive_src is set. e1d8c65

But, otherwise, it still remains an old e1d8c65#diff-2ecd9b536bc387479d824dc4b53f89679d6978d25c6b8a28ab21ed03e745e46eR1270 filename object.

So, I guess that we only need to decref this object when interactive_src is set.

Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

LGTM. My research has come to the same results.
Also, I can confirm that all examples from me and @chgnrdv with this fix works as expected.

@pablogsal pablogsal merged commit 124259f into python:main Oct 20, 2023
aisk pushed a commit to aisk/cpython that referenced this pull request Feb 11, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants