René's URL Explorer Experiment


Title: gh-94518: Port 23-argument `_posixsubprocess.fork_exec` to Argument Clinic by arhadthedev · Pull Request #94519 · python/cpython · GitHub

Open Graph Title: gh-94518: Port 23-argument `_posixsubprocess.fork_exec` to Argument Clinic by arhadthedev · Pull Request #94519 · python/cpython

X Title: gh-94518: Port 23-argument `_posixsubprocess.fork_exec` to Argument Clinic by arhadthedev · Pull Request #94519 · python/cpython

Description: Edit: in addition to what a title says, this PR also removes theoretical situation of /call_set[ug]id==true/ with uninitialized /[ug]id/. This is required to avoid undefined behavior (as Christian Heimes initially pointed out). A full removal of call_setgid will be done in a separate PR. To break nothing, the porting was done in steps, a commit per each: Employment of clinic from 3.11 to preserve format strings for visual comparison Type changing of two parameters that are passed from Python as a boolean but treated in C as integers Upgrade of clinic to 3.12 because verification of format strings is not required anymore Fix of optimization blockers (BTW, it inspired gh-94512) Also, it fixes minor bug traps: converges variable declaration and initialization in an attempt to hunt down a memory leak detected by ASAN assigns (...id)-1 as an impossible default value to gid and uid local variables (thanks to Christian for proposing this) moved out into gh-94687 Issue: gh-94518

Open Graph Description: Edit: in addition to what a title says, this PR also removes theoretical situation of /call_set[ug]id==true/ with uninitialized /[ug]id/. This is required to avoid undefined behavior (as Christian ...

X Description: Edit: in addition to what a title says, this PR also removes theoretical situation of /call_set[ug]id==true/ with uninitialized /[ug]id/. This is required to avoid undefined behavior (as Christian ...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:99262324-d211-25c9-2cc7-2cec5eb264a5
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEC34:23D843:159517:1CB143:6969B830
html-safe-nonce52acc893057c8d8484dbe5f3b1d0723acfdd63b9e8a2cd4ca88878f4ceefe357
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQzM0OjIzRDg0MzoxNTk1MTc6MUNCMTQzOjY5NjlCODMwIiwidmlzaXRvcl9pZCI6Ijc4OTIxNTI3NjYzODM2MzQ0ODEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac41bb6c2b604c9a0864df18c6be86680b7e19c1c828bc55cf1f059cd43ebc84d1
hovercard-subject-tagpull_request:985605576
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/94519/files
twitter:imagehttps://avatars.githubusercontent.com/u/4881073?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/4881073?s=400&v=4
og:image:altEdit: in addition to what a title says, this PR also removes theoretical situation of /call_set[ug]id==true/ with uninitialized /[ug]id/. This is required to avoid undefined behavior (as Christian ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacedec8b5f975d9e3d494ddd8f949b0b8a0de59d393901e26f73df9dcba80056
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
release83c08c21cdda978090dc44364b71aa5bc6dcea79
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/94519/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F94519%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
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
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
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/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%2F94519%2Ffiles
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%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/94519/files
Reloadhttps://github.com/python/cpython/pull/94519/files
Reloadhttps://github.com/python/cpython/pull/94519/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/94519/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k 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.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/94519/files
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 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
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
gpsheadhttps://github.com/gpshead
python:mainhttps://github.com/python/cpython/tree/main
arhadthedev:burn-posixsubprocess-with-achttps://github.com/arhadthedev/cpython/tree/burn-posixsubprocess-with-ac
Conversation 21 https://github.com/python/cpython/pull/94519
Commits 26 https://github.com/python/cpython/pull/94519/commits
Checks 0 https://github.com/python/cpython/pull/94519/checks
Files changed https://github.com/python/cpython/pull/94519/files
Please reload this pagehttps://github.com/python/cpython/pull/94519/files
gh-94518: Port 23-argument _posixsubprocess.fork_exec to Argument Clinic https://github.com/python/cpython/pull/94519/files#top
Show all changes 26 commits https://github.com/python/cpython/pull/94519/files
2e438d9 Convert fork_exec to pre-inlined-argparser Argument Clinic arhadthedev Jul 2, 2022 https://github.com/python/cpython/pull/94519/commits/2e438d91d6bdd30407db02d0c7fa8aae21a22779
514a377 Make flag parameters boolean arhadthedev Jul 2, 2022 https://github.com/python/cpython/pull/94519/commits/514a377d658161b8ddaeac12449b752006bd06a1
f6ffbb7 Regenerate clinic 3.10 files using clinic 3.12 arhadthedev Jul 2, 2022 https://github.com/python/cpython/pull/94519/commits/f6ffbb786b7e4d872e1185ebc2d35319018847d6
bed7d60 Fix forced arg format arhadthedev Jul 2, 2022 https://github.com/python/cpython/pull/94519/commits/bed7d603879027d4843f8becb2cfedb4573a2fa0
603be00 Fixed a non-existent name left after renaming arhadthedev Jul 3, 2022 https://github.com/python/cpython/pull/94519/commits/603be009e22a9a85ccfa6118b275e794ff9c434e
a0646e6 Revert named arguments in multiprocessing/util.py arhadthedev Jul 3, 2022 https://github.com/python/cpython/pull/94519/commits/a0646e688536980579fa0a909a707d5735e8484a
86edd0e Add a NEWS entry arhadthedev Jul 3, 2022 https://github.com/python/cpython/pull/94519/commits/86edd0e8dbf5f6e353990b6772620c34f48336b9
fe48164 Move uninitialized variables closer to their initialization arhadthedev Jul 5, 2022 https://github.com/python/cpython/pull/94519/commits/fe48164a1a0f81b515291d4da55eec250b262c72
90bb494 Mark do_fork_exec as C11 _Noreturn and remove `return 0` hack arhadthedev Jul 5, 2022 https://github.com/python/cpython/pull/94519/commits/90bb494c0c9b0de36e85108b204390e3387507d1
d0a586c Address the review on undefined gid/uid arhadthedev Jul 5, 2022 https://github.com/python/cpython/pull/94519/commits/d0a586c5c5177daeccf3c4eb8fede654e0fa0b8c
df6bb72 Fix an unitialized PID arhadthedev Jul 6, 2022 https://github.com/python/cpython/pull/94519/commits/df6bb7257db91fe2e514db34d599eaecf2878da8
c927533 Remove confusing out-of-place variable definitions arhadthedev Jul 7, 2022 https://github.com/python/cpython/pull/94519/commits/c9275336521f20968a85de9076d5f1a6d7b25c35
9cb1268 Fix fluke (?) "pid may be used uninitialized in this function" arhadthedev Jul 7, 2022 https://github.com/python/cpython/pull/94519/commits/9cb12683028426008668dbe383f234097551d33b
18e8821 Fix a minor grammar error arhadthedev Jul 7, 2022 https://github.com/python/cpython/pull/94519/commits/18e8821960879a8d3ceeb5d3c6ba2b07b38f454a
c822f10 Address Gregory's review arhadthedev Jul 26, 2022 https://github.com/python/cpython/pull/94519/commits/c822f10e1279cf59e0c11d94c2cde03d00a66910
0c6725e Merge branch 'main' into burn-posixsubprocess-with-ac arhadthedev Jan 15, 2023 https://github.com/python/cpython/pull/94519/commits/0c6725e99ec24e8dfa0e2cefd74ecf2346536dbb
2535f5e Update a clinic file arhadthedev Jan 15, 2023 https://github.com/python/cpython/pull/94519/commits/2535f5ed76d29c7235d0a3763ba679e95fb88e31
6822d10 Remove a redundant initialization already covered in all `if` branche… arhadthedev Jan 15, 2023 https://github.com/python/cpython/pull/94519/commits/6822d1040a5999a88b8154c41f979abfe2e0e6c2
e09851f Bring groups -> extra_groups from the main arhadthedev Jan 26, 2023 https://github.com/python/cpython/pull/94519/commits/e09851fe6de37de342194e4cfe24e16f786410e9
a75cc40 Merge branch 'main' into burn-posixsubprocess-with-ac arhadthedev Jan 26, 2023 https://github.com/python/cpython/pull/94519/commits/a75cc4009dc6656c9a0de4a08f34b27aebca85e1
d070f06 Merge branch 'main' into burn-posixsubprocess-with-ac arhadthedev Mar 22, 2023 https://github.com/python/cpython/pull/94519/commits/d070f06bbe7e14646f5c9d5e15ee6e355287af1e
7251169 Fix reading from uninitialized `pid` arhadthedev Apr 12, 2023 https://github.com/python/cpython/pull/94519/commits/7251169ab52314e66c6b0fdc4320ede73e192290
4ec550d Merge branch 'main' into burn-posixsubprocess-with-ac arhadthedev Apr 15, 2023 https://github.com/python/cpython/pull/94519/commits/4ec550db349c37b0ebb869bc06573a922f17e968
c7e1a5e Minimize the diff arhadthedev Apr 15, 2023 https://github.com/python/cpython/pull/94519/commits/c7e1a5e2b34b2ae76eb8bb93ea45bd3ea18017de
cda283a Merge branch 'main' into burn-posixsubprocess-with-ac arhadthedev Apr 23, 2023 https://github.com/python/cpython/pull/94519/commits/cda283a94c7029f4ed3a8e26f939b2b1f30af582
2356ec5 Merge branch 'main' into burn-posixsubprocess-with-ac gpshead Apr 24, 2023 https://github.com/python/cpython/pull/94519/commits/2356ec5e632716d5c1ff04eafb0df32ff8f2b1b8
Clear filters https://github.com/python/cpython/pull/94519/files
Please reload this pagehttps://github.com/python/cpython/pull/94519/files
Please reload this pagehttps://github.com/python/cpython/pull/94519/files
2022-07-03-23-13-28.gh-issue-94518.511Tbh.rst https://github.com/python/cpython/pull/94519/files#diff-3aad0aaa07b91bfd1b244034d97b2d951d60e8b10e8f678f88247fedf1266d40
_posixsubprocess.c https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
_posixsubprocess.c.h https://github.com/python/cpython/pull/94519/files#diff-e958219285e35bdab623c2c7c2d17fbc8ab42c0960e8157533339c28810f7580
Misc/NEWS.d/next/Library/2022-07-03-23-13-28.gh-issue-94518.511Tbh.rsthttps://github.com/python/cpython/pull/94519/files#diff-3aad0aaa07b91bfd1b244034d97b2d951d60e8b10e8f678f88247fedf1266d40
View file https://github.com/arhadthedev/cpython/blob/2356ec5e632716d5c1ff04eafb0df32ff8f2b1b8/Misc/NEWS.d/next/Library/2022-07-03-23-13-28.gh-issue-94518.511Tbh.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/94519/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L585
Modules/_posixsubprocess.chttps://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
View file https://github.com/arhadthedev/cpython/blob/2356ec5e632716d5c1ff04eafb0df32ff8f2b1b8/Modules/_posixsubprocess.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/94519/{{ revealButtonHref }}
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
https://github.com/python/cpython/pull/94519/files#diff-e182817ec4633ebe50bbfa9a6d0b7c00be01307f5457abfc85f9689055be908b
Modules/clinic/_posixsubprocess.c.hhttps://github.com/python/cpython/pull/94519/files#diff-e958219285e35bdab623c2c7c2d17fbc8ab42c0960e8157533339c28810f7580
View file https://github.com/arhadthedev/cpython/blob/2356ec5e632716d5c1ff04eafb0df32ff8f2b1b8/Modules/clinic/_posixsubprocess.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/94519/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.