René's URL Explorer Experiment


Title: gh-73069: fix race conditions in os.scandir and associated direntry by duaneg · Pull Request #131642 · python/cpython · GitHub

Open Graph Title: gh-73069: fix race conditions in os.scandir and associated direntry by duaneg · Pull Request #131642 · python/cpython

X Title: gh-73069: fix race conditions in os.scandir and associated direntry by duaneg · Pull Request #131642 · python/cpython

Description: The Python programming language. Contribute to python/cpython development by creating an account on GitHub.

Open Graph Description: This fixes the first two (c1 & c2) crashes from gh-73069. Let me know if I should add a news entry.

X Description: This fixes the first two (c1 & c2) crashes from gh-73069. Let me know if I should add a news entry.

Opengraph URL: https://github.com/python/cpython/pull/131642

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:f6265126-58bd-6cfd-0bbc-57ebfac5fd6c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idBDF0:D635E:170E02D:2173997:6A562668
html-safe-nonce916bf98ed8265fcf8ad73540b74771b9c506a05a6b442596adf540afe5bb6e57
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCREYwOkQ2MzVFOjE3MEUwMkQ6MjE3Mzk5Nzo2QTU2MjY2OCIsInZpc2l0b3JfaWQiOiIyMjA1MTA0NDYyODc1NzMxNTYwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1314c8314051576f2a5e5f97c95e8792ec98a4172b8fb83f03bab559c54ef646
hovercard-subject-tagpull_request:2412448177
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/131642/commits
twitter:imagehttps://opengraph.githubassets.com/29dc4454fdb051594bb31ff054d017f72cb4b1d1fb424cd0c2470e2bf42324f9/python/cpython/pull/131642
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/29dc4454fdb051594bb31ff054d017f72cb4b1d1fb424cd0c2470e2bf42324f9/python/cpython/pull/131642
og:image:altThis fixes the first two (c1 & c2) crashes from gh-73069. Let me know if I should add a news entry.
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameduaneg
hostnamegithub.com
expected-hostnamegithub.com
Noneeeb71977be324ce2bc7c4afd597296b8e3527d8922ad94632edd7a7296f8031b
turbo-cache-controlno-cache
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release3e7957744c8a44d05ff1e464dc5d119e60b98fae
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/131642/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F131642%2Fcommits
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F131642%2Fcommits
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/131642/commits
Reloadhttps://github.com/python/cpython/pull/131642/commits
Reloadhttps://github.com/python/cpython/pull/131642/commits
Please reload this pagehttps://github.com/python/cpython/pull/131642/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/131642/commits
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
duaneghttps://github.com/duaneg
python:mainhttps://github.com/python/cpython/tree/main
duaneg:gh-73069https://github.com/duaneg/cpython/tree/gh-73069
Conversationhttps://github.com/python/cpython/pull/131642
Commits10 (10)https://github.com/python/cpython/pull/131642/commits
Checkshttps://github.com/python/cpython/pull/131642/checks
Files changedhttps://github.com/python/cpython/pull/131642/files
gh-73069: fix race conditions in os.scandir and associated direntryhttps://github.com/python/cpython/pull/131642/commits#top
duaneghttps://github.com/duaneg
python:mainhttps://github.com/python/cpython/tree/main
duaneg:gh-73069https://github.com/duaneg/cpython/tree/gh-73069
gh-73069 c1: fix race conditions with os.scandir iteratorhttps://github.com/python/cpython/pull/131642/commits/7cc4a85edecc32dc4cfa477444c974b5cc99e1ee
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
7cc4a85https://github.com/python/cpython/pull/131642/commits/7cc4a85edecc32dc4cfa477444c974b5cc99e1ee
https://github.com/python/cpython/tree/7cc4a85edecc32dc4cfa477444c974b5cc99e1ee
gh-73069 c2: fix race conditions with os.scandir direntry stathttps://github.com/python/cpython/pull/131642/commits/a23f0dd465909da6af008a396c487afeebb0ad7a
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
a23f0ddhttps://github.com/python/cpython/pull/131642/commits/a23f0dd465909da6af008a396c487afeebb0ad7a
https://github.com/python/cpython/tree/a23f0dd465909da6af008a396c487afeebb0ad7a
NEWS entry for gh-73069https://github.com/python/cpython/pull/131642/commits/7ef377f9e5f99e7aecb6e68361ecceeb78a41490
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
7ef377fhttps://github.com/python/cpython/pull/131642/commits/7ef377f9e5f99e7aecb6e68361ecceeb78a41490
https://github.com/python/cpython/tree/7ef377f9e5f99e7aecb6e68361ecceeb78a41490
Switch to _PyRecursiveMutex from PyMutexhttps://github.com/python/cpython/pull/131642/commits/f757a3b8f3ca2d92819e4178efe248e9f8e5d336
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
f757a3bhttps://github.com/python/cpython/pull/131642/commits/f757a3b8f3ca2d92819e4178efe248e9f8e5d336
https://github.com/python/cpython/tree/f757a3b8f3ca2d92819e4178efe248e9f8e5d336
Refactor so mutex is held for minimal time and not over any code that could behttps://github.com/python/cpython/pull/131642/commits/40730d36daed6936deb781a5f66843e86c192595
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
40730d3https://github.com/python/cpython/pull/131642/commits/40730d36daed6936deb781a5f66843e86c192595
https://github.com/python/cpython/tree/40730d36daed6936deb781a5f66843e86c192595
Refactor to use atomics & compare/exchange instead of holding a lock to avoidhttps://github.com/python/cpython/pull/131642/commits/d374264a3cf7a146777e3e20359d6804eb0f2bac
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
d374264https://github.com/python/cpython/pull/131642/commits/d374264a3cf7a146777e3e20359d6804eb0f2bac
https://github.com/python/cpython/tree/d374264a3cf7a146777e3e20359d6804eb0f2bac
Refactor to share code and eliminate duplication between Windows & POSIX platformshttps://github.com/python/cpython/pull/131642/commits/6b3b46d4bed99ca2a1aba78ff36f485b62d7ac23
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
6b3b46dhttps://github.com/python/cpython/pull/131642/commits/6b3b46d4bed99ca2a1aba78ff36f485b62d7ac23
https://github.com/python/cpython/tree/6b3b46d4bed99ca2a1aba78ff36f485b62d7ac23
struct dirent is variable length in the original POSIX specification (the finalhttps://github.com/python/cpython/pull/131642/commits/072a07cec3e0400d69e1ab7c4725ab12c01cb2dc
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
072a07chttps://github.com/python/cpython/pull/131642/commits/072a07cec3e0400d69e1ab7c4725ab12c01cb2dc
https://github.com/python/cpython/tree/072a07cec3e0400d69e1ab7c4725ab12c01cb2dc
Merge remote-tracking branch 'origin/main' into gh-73069https://github.com/python/cpython/pull/131642/commits/19a58a1305eafd96dc16c9b3a2f477e2bee71fdf
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
19a58a1https://github.com/python/cpython/pull/131642/commits/19a58a1305eafd96dc16c9b3a2f477e2bee71fdf
https://github.com/python/cpython/tree/19a58a1305eafd96dc16c9b3a2f477e2bee71fdf
Add regression testshttps://github.com/python/cpython/pull/131642/commits/e37ec68b6de1f7208624efb3462209ba5cf27003
https://github.com/duaneg
duaneghttps://github.com/python/cpython/commits?author=duaneg
e37ec68https://github.com/python/cpython/pull/131642/commits/e37ec68b6de1f7208624efb3462209ba5cf27003
https://github.com/python/cpython/tree/e37ec68b6de1f7208624efb3462209ba5cf27003
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.