Skip to content

Conversation

@sobolevn
Copy link
Member

@sobolevn sobolevn commented Jan 10, 2026

I also added one more test case for a second possible crash in the same function.

@JelleZijlstra
Copy link
Member

This needs NEWS since it fixes a user-visible crash.

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Actually this is incorrect. The crash can be triggered if the list is cleared while we're iterating over it in ga_repr_items_list. INCREFing here is insufficient to protect us because the item may not be valid in the first place any more by the time we receive it.

My repro case in #143823 makes this clearer.

@bedevere-app
Copy link

bedevere-app bot commented Jan 14, 2026

When you're done making the requested changes, leave the comment: I have made the requested changes; please review again.

@sobolevn
Copy link
Member Author

Thank you! I refactored the PR to include the fix for the third case.

@picnixz
Copy link
Member

picnixz commented Jan 14, 2026

I thought there were more occurrences pf this function but am I wrong? or is it just me on mobile?

@picnixz
Copy link
Member

picnixz commented Jan 14, 2026

Or is it just in recursive calls where we already hold enough strong references?

@JelleZijlstra
Copy link
Member

The other calls look safe to me.

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

Labels

awaiting merge needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants