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

gh-143635: Fix crash in_Py_typing_type_repr#143670

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
sobolevn merged 3 commits intopython:mainfromsobolevn:issue-143635
Jan 15, 2026

Conversation

@sobolevn
Copy link
Member

@sobolevnsobolevn commentedJan 10, 2026
edited by bedevere-appbot
Loading

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.

sobolevn reacted with thumbs up emoji

Copy link
Member

@JelleZijlstraJelleZijlstra 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 inga_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

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

@sobolevn
Copy link
MemberAuthor

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

@picnixz
Copy link
Member

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

@picnixz
Copy link
Member

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.

picnixz reacted with thumbs up emoji

@sobolevnsobolevn merged commitbdba5f0 intopython:mainJan 15, 2026
50 of 51 checks passed
@miss-islington-app
Copy link

Thanks@sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull requestJan 15, 2026
(cherry picked from commitbdba5f0)Co-authored-by: sobolevn <mail@sobolevn.me>
@miss-islington-app
Copy link

Sorry,@sobolevn, I could not cleanly backport this to3.13 due to a conflict.
Please backport usingcherry_picker on command line.

cherry_picker bdba5f0db2ab29f3deedb9416f3c143d33e4ab66 3.13

@bedevere-app
Copy link

GH-143851 is a backport of this pull request to the3.14 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.14bugs and security fixes labelJan 15, 2026
@bedevere-app
Copy link

GH-143852 is a backport of this pull request to the3.13 branch.

@bedevere-appbedevere-appbot removed the needs backport to 3.13bugs and security fixes labelJan 15, 2026
sobolevn added a commit to sobolevn/cpython that referenced this pull requestJan 15, 2026
…43670)(cherry picked from commitbdba5f0)Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull requestJan 15, 2026
)gh-143635: Fix crash in `ga_repr_items_list` (GH-143670)(cherry picked from commitbdba5f0)Co-authored-by: sobolevn <mail@sobolevn.me>
sobolevn added a commit that referenced this pull requestJan 15, 2026
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure⚠️⚠️⚠️

Hi! The buildbotARM64 macOS 3.13 (tier-2) has failed when building commitaa5ad50.

What do you need to do:

  1. Don't panic.
  2. Checkthe buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1404/builds/1470) and take a look at the build logs.
  4. Check if the failure is related to this commit (aa5ad50) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/#/builders/1404/builds/1470

Failed tests:

  • test.test_multiprocessing_forkserver.test_processes
  • test_urllib2net

Failed subtests:

  • test_repr_rlock - test.test_multiprocessing_forkserver.test_processes.WithProcessesTestLock.test_repr_rlock

Summary of the results of the build (if available):

==

Click to see traceback logs
Traceback (most recent call last):  File"/Users/buildbot/buildarea/3.13.pablogsal-macos-m1.macos-with-brew/build/Lib/test/_test_multiprocessing.py", line1493, intest_repr_rlockself.assertEqual('<RLock(SomeOtherThread, nonzero)>',repr(lock))~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^AssertionError:'<RLock(SomeOtherThread, nonzero)>' != '<RLock(None, 0)>'- <RLock(SomeOtherThread, nonzero)>+ <RLock(None, 0)>

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

Reviewers

@sergey-miryanovsergey-miryanovsergey-miryanov left review comments

@JelleZijlstraJelleZijlstraJelleZijlstra approved these changes

@picnixzpicnixzpicnixz approved these changes

Assignees

@sobolevnsobolevn

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

5 participants

@sobolevn@JelleZijlstra@picnixz@bedevere-bot@sergey-miryanov

[8]ページ先頭

©2009-2026 Movatter.jp