René's URL Explorer Experiment


Title: gh-111178: fix UBSan failures in `Modules/_datetimemodule.c` by picnixz · Pull Request #129774 · python/cpython · GitHub

Open Graph Title: gh-111178: fix UBSan failures in `Modules/_datetimemodule.c` by picnixz · Pull Request #129774 · python/cpython

X Title: gh-111178: fix UBSan failures in `Modules/_datetimemodule.c` by picnixz · Pull Request #129774 · python/cpython

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

Open Graph Description: This PR fixes the UBSan failures and addresses some minor cosmetic changes. PEP-7 changes were not applied since they could scramble the diff but other semantic changes affecting the signature of t...

X Description: This PR fixes the UBSan failures and addresses some minor cosmetic changes. PEP-7 changes were not applied since they could scramble the diff but other semantic changes affecting the signature of t...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:d3bf1e4d-9f15-2cc1-290f-fc8946e817eb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA846:9F1EC:74BBB7:A3F6D1:696A1DBE
html-safe-noncea9b9b3d4ab88b59f1e4b52a1d44bac2471119147104539e215ef6205e56368c2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODQ2OjlGMUVDOjc0QkJCNzpBM0Y2RDE6Njk2QTFEQkUiLCJ2aXNpdG9yX2lkIjoiNDA4OTE5MTExMTA1OTk3MTUxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacd0d41f0d3632d48840d0e21c53426963194b962ee1a46cf5a7d49ae97fa0c3cf
hovercard-subject-tagpull_request:2322011250
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/129774/commits
twitter:imagehttps://opengraph.githubassets.com/2026d078c51367858756c6f4a0d3c4352d58b3c56e62cfcf92d95f1295b29508/python/cpython/pull/129774
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/2026d078c51367858756c6f4a0d3c4352d58b3c56e62cfcf92d95f1295b29508/python/cpython/pull/129774
og:image:altThis PR fixes the UBSan failures and addresses some minor cosmetic changes. PEP-7 changes were not applied since they could scramble the diff but other semantic changes affecting the signature of t...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepicnixz
hostnamegithub.com
expected-hostnamegithub.com
None014f3d193f36b7d393f88ca22d06fbacd370800b40a547c1ea67291e02dc8ea3
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
released515f6f09fa57a93bf90355cb894eb84ca4f458f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/129774/commits#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F129774%2Fcommits
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%2F129774%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/129774/commits
Reloadhttps://github.com/python/cpython/pull/129774/commits
Reloadhttps://github.com/python/cpython/pull/129774/commits
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/129774/commits
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/129774/commits
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
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
picnixz:fix/ubsan/datetime-111178https://github.com/picnixz/cpython/tree/fix/ubsan/datetime-111178
Conversationhttps://github.com/python/cpython/pull/129774
Commits15 (15)https://github.com/python/cpython/pull/129774/commits
Checkshttps://github.com/python/cpython/pull/129774/checks
Files changedhttps://github.com/python/cpython/pull/129774/files
gh-111178: fix UBSan failures in Modules/_datetimemodule.chttps://github.com/python/cpython/pull/129774/commits#top
encukouhttps://github.com/encukou
python:mainhttps://github.com/python/cpython/tree/main
picnixz:fix/ubsan/datetime-111178https://github.com/picnixz/cpython/tree/fix/ubsan/datetime-111178
add cast macros for date and time objectshttps://github.com/python/cpython/pull/129774/commits/d4be207477317426a1e3ae04a10b1efc2499fe3d
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
d4be207https://github.com/python/cpython/pull/129774/commits/d4be207477317426a1e3ae04a10b1efc2499fe3d
https://github.com/python/cpython/tree/d4be207477317426a1e3ae04a10b1efc2499fe3d
fix UBSan failures for `PyDateTime_Delta`https://github.com/python/cpython/pull/129774/commits/6d1f2633f76738d5cd0a229733589607bfd8764c
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
6d1f263https://github.com/python/cpython/pull/129774/commits/6d1f2633f76738d5cd0a229733589607bfd8764c
https://github.com/python/cpython/tree/6d1f2633f76738d5cd0a229733589607bfd8764c
fix UBSan failures for `PyDateTime_Date`https://github.com/python/cpython/pull/129774/commits/1aeeff8da9c7d17a679bafc14145485e738c3b82
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
1aeeff8https://github.com/python/cpython/pull/129774/commits/1aeeff8da9c7d17a679bafc14145485e738c3b82
https://github.com/python/cpython/tree/1aeeff8da9c7d17a679bafc14145485e738c3b82
fix UBSan failures for `PyDateTime_TZInfo`https://github.com/python/cpython/pull/129774/commits/9fee212880c9a3cd264bd1fbca85fc4593f77077
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
9fee212https://github.com/python/cpython/pull/129774/commits/9fee212880c9a3cd264bd1fbca85fc4593f77077
https://github.com/python/cpython/tree/9fee212880c9a3cd264bd1fbca85fc4593f77077
fix UBSan failures for `PyDateTime_TimeZone`https://github.com/python/cpython/pull/129774/commits/76d2c68fa82dd0691d7373e7ff6b769a7704db88
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
76d2c68https://github.com/python/cpython/pull/129774/commits/76d2c68fa82dd0691d7373e7ff6b769a7704db88
https://github.com/python/cpython/tree/76d2c68fa82dd0691d7373e7ff6b769a7704db88
fix UBSan failures for `PyDateTime_Time`https://github.com/python/cpython/pull/129774/commits/25dbe3875dc8af4d693db6d48900c7f562da39a6
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
25dbe38https://github.com/python/cpython/pull/129774/commits/25dbe3875dc8af4d693db6d48900c7f562da39a6
https://github.com/python/cpython/tree/25dbe3875dc8af4d693db6d48900c7f562da39a6
fix UBSan failures for `PyDateTime_DateTime`https://github.com/python/cpython/pull/129774/commits/0a3cb0e455b3ae32bfb159508df4db0b105a4419
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
0a3cb0ehttps://github.com/python/cpython/pull/129774/commits/0a3cb0e455b3ae32bfb159508df4db0b105a4419
https://github.com/python/cpython/tree/0a3cb0e455b3ae32bfb159508df4db0b105a4419
fix UBSan failures for `PyDateTime_IsoCalendarDate`https://github.com/python/cpython/pull/129774/commits/19bc7e1420c44378876837f50c8490ff3d1b4458
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
19bc7e1https://github.com/python/cpython/pull/129774/commits/19bc7e1420c44378876837f50c8490ff3d1b4458
https://github.com/python/cpython/tree/19bc7e1420c44378876837f50c8490ff3d1b4458
use 'dummy' for NOARGS methodhttps://github.com/python/cpython/pull/129774/commits/b189115328f2a133d152ccea35b54ba7b5082d64
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
b189115https://github.com/python/cpython/pull/129774/commits/b189115328f2a133d152ccea35b54ba7b5082d64
https://github.com/python/cpython/tree/b189115328f2a133d152ccea35b54ba7b5082d64
use 'dummy' for NOARGS methodhttps://github.com/python/cpython/pull/129774/commits/3c883a68c4b0dda0a538a897eb64473466fecb50
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
3c883a6https://github.com/python/cpython/pull/129774/commits/3c883a68c4b0dda0a538a897eb64473466fecb50
https://github.com/python/cpython/tree/3c883a68c4b0dda0a538a897eb64473466fecb50
Merge remote-tracking branch 'upstream/main' into fix/ubsan/datetime-111178https://github.com/python/cpython/pull/129774/commits/86af79a917a51b3f7c8787cc672cf09787046e8a
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
86af79ahttps://github.com/python/cpython/pull/129774/commits/86af79a917a51b3f7c8787cc672cf09787046e8a
https://github.com/python/cpython/tree/86af79a917a51b3f7c8787cc672cf09787046e8a
Fixup naminghttps://github.com/python/cpython/pull/129774/commits/22bdf8c59e74cd5d028e591399b2b98041e78db5
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
22bdf8chttps://github.com/python/cpython/pull/129774/commits/22bdf8c59e74cd5d028e591399b2b98041e78db5
https://github.com/python/cpython/tree/22bdf8c59e74cd5d028e591399b2b98041e78db5
Do not use `_` + capital letter in new code as it is also UB.https://github.com/python/cpython/pull/129774/commits/b6ee734cc1f43a698eb7780e0d61473925d833ce
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
b6ee734https://github.com/python/cpython/pull/129774/commits/b6ee734cc1f43a698eb7780e0d61473925d833ce
https://github.com/python/cpython/tree/b6ee734cc1f43a698eb7780e0d61473925d833ce
Merge branch 'fix/ubsan/datetime-111178' of github.com:picnixz/cpython into fix/ubsan/datetime-111178https://github.com/python/cpython/pull/129774/commits/9296eb638444e91e7d9259cd16e5405d9d2a7048
https://github.com/picnixz
picnixzhttps://github.com/python/cpython/commits?author=picnixz
9296eb6https://github.com/python/cpython/pull/129774/commits/9296eb638444e91e7d9259cd16e5405d9d2a7048
https://github.com/python/cpython/tree/9296eb638444e91e7d9259cd16e5405d9d2a7048
Merge in the main branch to resolve conflict with #127345https://github.com/python/cpython/pull/129774/commits/f108a14cd6f64bdd1f225a2af6a3bf328d22ed70
https://github.com/encukou
encukouhttps://github.com/python/cpython/commits?author=encukou
f108a14https://github.com/python/cpython/pull/129774/commits/f108a14cd6f64bdd1f225a2af6a3bf328d22ed70
https://github.com/python/cpython/tree/f108a14cd6f64bdd1f225a2af6a3bf328d22ed70
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.