René's URL Explorer Experiment


Title: Segmentation Fault in pthread_getcpuclockid function in time module · Issue #115378 · python/cpython · GitHub

Open Graph Title: Segmentation Fault in pthread_getcpuclockid function in time module · Issue #115378 · python/cpython

X Title: Segmentation Fault in pthread_getcpuclockid function in time module · Issue #115378 · python/cpython

Description: What happened? Version Python 3.13.0a3+ (heads/main:b3f0b698da, Feb 12 2024, 03:56:25) [GCC 11.4.0] bisect from commit e14679c Root Cause the time_pthread_getcpuclockid function retrieves an element from the user input. but improper vali...

Open Graph Description: What happened? Version Python 3.13.0a3+ (heads/main:b3f0b698da, Feb 12 2024, 03:56:25) [GCC 11.4.0] bisect from commit e14679c Root Cause the time_pthread_getcpuclockid function retrieves an elemen...

X Description: What happened? Version Python 3.13.0a3+ (heads/main:b3f0b698da, Feb 12 2024, 03:56:25) [GCC 11.4.0] bisect from commit e14679c Root Cause the time_pthread_getcpuclockid function retrieves an elemen...

Opengraph URL: https://github.com/python/cpython/issues/115378

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Segmentation Fault in pthread_getcpuclockid function in time module","articleBody":"### What happened?\r\n\r\n### Version\r\nPython 3.13.0a3+ (heads/main:b3f0b698da, Feb 12 2024, 03:56:25) [GCC 11.4.0]\r\nbisect from commit e14679c78464d1e0e16786c2a0e9bcebe49e842b\r\n\r\n### Root Cause\r\n\r\nthe time_pthread_getcpuclockid function retrieves an element from the user input. but improper validation of the thread id trigger segmentation fault\r\n\r\n\r\n```c\r\ntime_pthread_getcpuclockid(PyObject *self, PyObject *args)\r\n{\r\n    unsigned long thread_id;\r\n    int err;\r\n    clockid_t clk_id;\r\n    if (!PyArg_ParseTuple(args, \"k:pthread_getcpuclockid\", \u0026thread_id)) {\r\n        return NULL;\r\n    }\r\n    err = pthread_getcpuclockid((pthread_t)thread_id, \u0026clk_id); // \u003c-- thread_id from args\r\n    if (err) {\r\n        errno = err;\r\n        PyErr_SetFromErrno(PyExc_OSError);\r\n        return NULL;\r\n    }\r\n#ifdef _Py_MEMORY_SANITIZER\r\n    __msan_unpoison(\u0026clk_id, sizeof(clk_id));\r\n#endif\r\n    return PyLong_FromLong(clk_id);\r\n}\r\n```\r\n\r\n### POC\r\n\r\nimport time\r\ntime.pthread_getcpuclockid(-1)\r\n\r\n\r\n\u003cdetails\u003e\r\n  \u003csummary\u003easan\u003c/summary\u003e\r\n\r\n```\r\nAddressSanitizer:DEADLYSIGNAL\r\n=================================================================\r\n==9985==ERROR: AddressSanitizer: SEGV on unknown address 0x0000000002ce (pc 0x7f5176af3159 bp 0x7ffcb8437230 sp 0x7ffcb8437178 T0)\r\n==9985==The signal is caused by a READ memory access.\r\n==9985==Hint: address points to the zero page.\r\n    #0 0x7f5176af3159 in __pthread_getcpuclockid nptl/pthread_getcpuclockid.c:32\r\n    #1 0x564afa3983a1 in time_pthread_getcpuclockid Modules/timemodule.c:380\r\n    #2 0x564af9eafacf in cfunction_call Objects/methodobject.c:551\r\n    #3 0x564af9dc0393 in _PyObject_MakeTpCall Objects/call.c:242\r\n    #4 0x564af9dc0a94 in _PyObject_VectorcallTstate Include/internal/pycore_call.h:166\r\n    #5 0x564af9dc0ac0 in PyObject_Vectorcall Objects/call.c:327\r\n    #6 0x564afa0cd313 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:815\r\n    #7 0x564afa11a855 in _PyEval_EvalFrame Include/internal/pycore_ceval.h:115\r\n    #8 0x564afa11a855 in _PyEval_Vector Python/ceval.c:1788\r\n    #9 0x564afa11aa76 in PyEval_EvalCode Python/ceval.c:592\r\n    #10 0x564afa2245d9 in run_eval_code_obj Python/pythonrun.c:1294\r\n    #11 0x564afa227522 in run_mod Python/pythonrun.c:1379\r\n    #12 0x564afa228302 in pyrun_file Python/pythonrun.c:1215\r\n    #13 0x564afa22a8f0 in _PyRun_SimpleFileObject Python/pythonrun.c:464\r\n    #14 0x564afa22ac8c in _PyRun_AnyFileObject Python/pythonrun.c:77\r\n    #15 0x564afa2872c0 in pymain_run_file_obj Modules/main.c:357\r\n    #16 0x564afa289a71 in pymain_run_file Modules/main.c:376\r\n    #17 0x564afa28a682 in pymain_run_python Modules/main.c:628\r\n    #18 0x564afa28a812 in Py_RunMain Modules/main.c:707\r\n    #19 0x564afa28a9f9 in pymain_main Modules/main.c:737\r\n    #20 0x564afa28ad71 in Py_BytesMain Modules/main.c:761\r\n    #21 0x564af9c24b05 in main Programs/python.c:15\r\n    #22 0x7f5176a86d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58\r\n    #23 0x7f5176a86e3f in __libc_start_main_impl ../csu/libc-start.c:392\r\n    #24 0x564af9c24a34 in _start (/cpython/python+0x26fa34)\r\n\r\nAddressSanitizer can not provide additional info.\r\nSUMMARY: AddressSanitizer: SEGV nptl/pthread_getcpuclockid.c:32 in __pthread_getcpuclockid\r\n==9985==ABORTING\r\n```\r\n\r\n\r\n\u003c/details\u003e\r\n\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\r\n\r\n### Output from running 'python -VV' on the command line:\r\n\r\nPython 3.13.0a3+ (heads/main:b3f0b698da, Feb 12 2024, 03:56:25) [GCC 11.4.0]","author":{"url":"https://github.com/kcatss","@type":"Person","name":"kcatss"},"datePublished":"2024-02-12T22:36:50.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/115378/cpython/issues/115378"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:9823535a-5c6b-cd6b-92ca-2d17a6613e92
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-id97D6:225E33:838A00:B177C9:6969792B
html-safe-nonce17345331357d972fd5ec36766710cdaf003c3a40f748a5551f8c93327384c52d
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5N0Q2OjIyNUUzMzo4MzhBMDA6QjE3N0M5OjY5Njk3OTJCIiwidmlzaXRvcl9pZCI6IjQ4NTA5MzcxNjkxMjQ2MjA1ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac8c979a2b8d6257fc96b2f9b0f48431ca2212b127bdf7633edb1f118f3d15e94f
hovercard-subject-tagissue:2131108087
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/115378/issue_layout
twitter:imagehttps://opengraph.githubassets.com/970da1d44aad38b94f6d4c6744d3b8b79f6c93b966f521d20ff904d49b4d37c2/python/cpython/issues/115378
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/970da1d44aad38b94f6d4c6744d3b8b79f6c93b966f521d20ff904d49b4d37c2/python/cpython/issues/115378
og:image:altWhat happened? Version Python 3.13.0a3+ (heads/main:b3f0b698da, Feb 12 2024, 03:56:25) [GCC 11.4.0] bisect from commit e14679c Root Cause the time_pthread_getcpuclockid function retrieves an elemen...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamekcatss
hostnamegithub.com
expected-hostnamegithub.com
Nonec6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881
turbo-cache-controlno-preview
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
release212e3e3d3298bf5b313830edfd2399e869f7ea76
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/115378#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F115378
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%2Fissues%2F115378
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/115378
Reloadhttps://github.com/python/cpython/issues/115378
Reloadhttps://github.com/python/cpython/issues/115378
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/115378
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/issues/115378
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
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/115378
New issuehttps://github.com/login?return_to=https://github.com/python/cpython/issues/115378
Segmentation Fault in pthread_getcpuclockid function in time modulehttps://github.com/python/cpython/issues/115378#top
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
https://github.com/kcatss
https://github.com/kcatss
kcatsshttps://github.com/kcatss
on Feb 12, 2024https://github.com/python/cpython/issues/115378#issue-2131108087
e14679chttps://github.com/python/cpython/commit/e14679c78464d1e0e16786c2a0e9bcebe49e842b
type-crashA hard crash of the interpreter, possibly with a core dumphttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-crash%22
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.