René's URL Explorer Experiment


Title: gh-153400: Resolve newer libc/syscall wrappers at runtime on Linux by daandemeyer · Pull Request #154816 · python/cpython · GitHub

Open Graph Title: gh-153400: Resolve newer libc/syscall wrappers at runtime on Linux by daandemeyer · Pull Request #154816 · python/cpython

X Title: gh-153400: Resolve newer libc/syscall wrappers at runtime on Linux by daandemeyer · Pull Request #154816 · python/cpython

Description: os functions like copy_file_range() are gated on a configure-time AC_CHECK_FUNCS probe and compiled out when the build libc lacks the symbol. A redistributable built against an old glibc (the python-build-standalone builds target glibc 2.17) therefore never exposes them, even when run on a newer glibc or a capable kernel. Add Modules/posixshims.h, which on Linux always exposes Py(), resolves the libc symbol once at load time via dlsym(RTLD_DEFAULT) from a constructor, and falls back to the raw syscall when the running libc lacks the wrapper. Resolving in a constructor keeps dlsym(), which is not async-signal-safe, out of signal handlers and the fork()/exec() window. Off Linux the classic build-time HAVE_* direct calls are kept. Limit the shims to wrappers newer than the glibc 2.17 baseline, since anything at or below it is always present in the build libc: copy_file_range (glibc 2.27) memfd_create (glibc 2.27) pidfd_open (glibc 2.36) pidfd_getfd (glibc 2.36) pidfd_open() and pidfd_getfd() previously issued raw syscalls unconditionally; they now prefer the glibc wrapper when present. Issue: gh-153400

Open Graph Description: os functions like copy_file_range() are gated on a configure-time AC_CHECK_FUNCS probe and compiled out when the build libc lacks the symbol. A redistributable built against an old glibc (the pytho...

X Description: os functions like copy_file_range() are gated on a configure-time AC_CHECK_FUNCS probe and compiled out when the build libc lacks the symbol. A redistributable built against an old glibc (the pytho...

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

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:fd720b54-a392-5d74-b2a4-0fd77c64a0b9
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id8D3A:2C4BED:3CB75ED:4D17689:6B0209A2
html-safe-nonceb17122abf79305800877975289707a9aa8e991e1e31e06ba8df54dab6c6ee614
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RDNBOjJDNEJFRDozQ0I3NUVEOjREMTc2ODk6NkIwMjA5QTIiLCJ2aXNpdG9yX2lkIjoiNDYzOTkwNzE3NjU4Mjg3NTU1NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac157487dc52662cb8faca28f1a7236d01ac9969e28aabaf46fda2e116e8091f1e
hovercard-subject-tagpull_request:4151113236
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/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/154816/files
twitter:imagehttps://avatars.githubusercontent.com/u/9395011?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/9395011?s=400&v=4
og:image:altos functions like copy_file_range() are gated on a configure-time AC_CHECK_FUNCS probe and compiled out when the build libc lacks the symbol. A redistributable built against an old glibc (the pytho...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
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 full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/154816/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F154816%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F154816%2Ffiles
Sign uphttps://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%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/154816/files
Reloadhttps://github.com/python/cpython/pull/154816/files
Reloadhttps://github.com/python/cpython/pull/154816/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
daandemeyerhttps://github.com/daandemeyer
python:mainhttps://github.com/python/cpython/tree/main
daandemeyer:posix-runtime-libc-shimshttps://github.com/daandemeyer/cpython/tree/posix-runtime-libc-shims
Conversation 5 https://github.com/python/cpython/pull/154816
Commits 1 https://github.com/python/cpython/pull/154816/commits
Checks 51 https://github.com/python/cpython/pull/154816/checks
Files changed 5 https://github.com/python/cpython/pull/154816/files
gh-153400: Resolve newer libc/syscall wrappers at runtime on Linux https://github.com/python/cpython/pull/154816/files#top
Show all changes 1 commit https://github.com/python/cpython/pull/154816/files
e104c08 gh-153400: Resolve newer libc/syscall wrappers at runtime on Linux daandemeyer Jul 9, 2026 https://github.com/python/cpython/pull/154816/commits/e104c0852dd997fe708e58120b9cab58fb0b0f34
Clear filters https://github.com/python/cpython/pull/154816/files
Please reload this pagehttps://github.com/python/cpython/pull/154816/files
Please reload this pagehttps://github.com/python/cpython/pull/154816/files
2026-07-09-10-19-10.gh-issue-153400.ELIvWE.rst https://github.com/python/cpython/pull/154816/files#diff-41c0b5b089406ace10175d6f38eb75175a78954446503acac3bcd787a13ee4cd
posixmodule.c.h https://github.com/python/cpython/pull/154816/files#diff-f4ec448d9bc73d373452e97931de916ca83058ae93bce4a5853b8ac18c9d2cfa
posixmodule.c https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
posixshims.h https://github.com/python/cpython/pull/154816/files#diff-413d0a54c66b96a1504b2ec1374aad32bfca09cf1e3cff5251f07ba4162644df
ignored.tsv https://github.com/python/cpython/pull/154816/files#diff-fa2373a9a002e491408e623369773045f4b7de90114b9f5ba6933bfbf2d8c45c
Misc/NEWS.d/next/Library/2026-07-09-10-19-10.gh-issue-153400.ELIvWE.rsthttps://github.com/python/cpython/pull/154816/files#diff-41c0b5b089406ace10175d6f38eb75175a78954446503acac3bcd787a13ee4cd
View file https://github.com/daandemeyer/cpython/blob/e104c0852dd997fe708e58120b9cab58fb0b0f34/Misc/NEWS.d/next/Library/2026-07-09-10-19-10.gh-issue-153400.ELIvWE.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/154816/{{ revealButtonHref }}
Modules/clinic/posixmodule.c.hhttps://github.com/python/cpython/pull/154816/files#diff-f4ec448d9bc73d373452e97931de916ca83058ae93bce4a5853b8ac18c9d2cfa
View file https://github.com/daandemeyer/cpython/blob/e104c0852dd997fe708e58120b9cab58fb0b0f34/Modules/clinic/posixmodule.c.h
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/python/cpython/pull/154816/files
Modules/posixmodule.chttps://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
View file https://github.com/daandemeyer/cpython/blob/e104c0852dd997fe708e58120b9cab58fb0b0f34/Modules/posixmodule.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/154816/{{ revealButtonHref }}
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
https://github.com/python/cpython/pull/154816/files#diff-b5b7e4f5599916b2018e911ef423f9d3fd46cb71268e1a73c74a1c9ae2cb6791
Modules/posixshims.hhttps://github.com/python/cpython/pull/154816/files#diff-413d0a54c66b96a1504b2ec1374aad32bfca09cf1e3cff5251f07ba4162644df
View file https://github.com/daandemeyer/cpython/blob/e104c0852dd997fe708e58120b9cab58fb0b0f34/Modules/posixshims.h
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/154816/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L129
Tools/c-analyzer/cpython/ignored.tsvhttps://github.com/python/cpython/pull/154816/files#diff-fa2373a9a002e491408e623369773045f4b7de90114b9f5ba6933bfbf2d8c45c
View file https://github.com/daandemeyer/cpython/blob/e104c0852dd997fe708e58120b9cab58fb0b0f34/Tools/c-analyzer/cpython/ignored.tsv
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/154816/{{ revealButtonHref }}
https://github.com/python/cpython/pull/154816/files#diff-fa2373a9a002e491408e623369773045f4b7de90114b9f5ba6933bfbf2d8c45c
Please reload this pagehttps://github.com/python/cpython/pull/154816/files
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.