Title: crash in PyTuple_GET_SIZE: Assertion `PyTuple_Check(op)' failed · Issue #138479 · python/cpython · GitHub
Open Graph Title: crash in PyTuple_GET_SIZE: Assertion `PyTuple_Check(op)' failed · Issue #138479 · python/cpython
X Title: crash in PyTuple_GET_SIZE: Assertion `PyTuple_Check(op)' failed · Issue #138479 · python/cpython
Description: Crash report What happened? The following code causes a crash in cpython: class Generic: def __call__(*a): print(a) def __getattr__(self, name): return Generic() name_5 = Generic() type name_3[*name_2] = 0 name_3[name_5][0] output: (<__m...
Open Graph Description: Crash report What happened? The following code causes a crash in cpython: class Generic: def __call__(*a): print(a) def __getattr__(self, name): return Generic() name_5 = Generic() type name_3[*nam...
X Description: Crash report What happened? The following code causes a crash in cpython: class Generic: def __call__(*a): print(a) def __getattr__(self, name): return Generic() name_5 = Generic() type name_3[*nam...
Opengraph URL: https://github.com/python/cpython/issues/138479
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"crash in PyTuple_GET_SIZE: Assertion `PyTuple_Check(op)' failed","articleBody":"# Crash report\n\n### What happened?\n\nThe following code causes a crash in cpython:\n\n```python\nclass Generic:\n\n def __call__(*a):\n print(a)\n\n def __getattr__(self, name):\n return Generic()\n\nname_5 = Generic()\ntype name_3[*name_2] = 0\nname_3[name_5][0]\n```\n\noutput:\n``` python\n(\u003c__main__.Generic object at 0x7fb99dc5a280>, name_3[\u003c__main__.Generic object at 0x7fb99d792420>], (0,))\n(\u003c__main__.Generic object at 0x7fb99dbd7960>, None)\npython3: ./Include/cpython/tupleobject.h:24: PyTuple_GET_SIZE: Assertion `PyTuple_Check(op)' failed.\nfish: Job 1, '../cpython/install/bin/python3 …' terminated by signal SIGABRT (Abbruch)\n```\n\nI found this example while fuzzing with [pysource-codegen](https://github.com/15r10nk/pysource-codegen).\n\n### CPython versions tested on:\n\n3.12, 3.13, 3.14, 3.15\n\n### Operating systems tested on:\n\nLinux\n\n### Output from running 'python -VV' on the command line:\n\nPython 3.14.0rc2+ (heads/3.14:45a79b4f4b7, Sep 3 2025, 22:05:34) [GCC 12.2.0]\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-138482\n* gh-138784\n* gh-138786\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/15r10nk","@type":"Person","name":"15r10nk"},"datePublished":"2025-09-03T20:24:10Z","url":"https://github.com/python/cpython/issues/138479"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:3c37ef9d-0944-0c2e-284a-aeb8b1684fb1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A9B8:1F87:13A733D:1881380:6B025CE9 |
| html-safe-nonce | 44d6e1d230132bf9fe1c133dbd4bacf436b5fc34bfafef2d069853132bcb182a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBOUI4OjFGODc6MTNBNzMzRDoxODgxMzgwOjZCMDI1Q0U5IiwidmlzaXRvcl9pZCI6IjQwMDM0MDIxMjQzNTEzOTcwOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 454063fc5443d0d2e0625c19c0bb64e3be4466efe57f427141db5350456e86ff |
| hovercard-subject-tag | issue:3381173631 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/138479/issue_layout |
| twitter:image | https://opengraph.githubassets.com/24543376a2cb6a1cfbe15afdf68e351f76d5ff7887c5f3d5beee140030232d86/python/cpython/issues/138479 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/24543376a2cb6a1cfbe15afdf68e351f76d5ff7887c5f3d5beee140030232d86/python/cpython/issues/138479 |
| og:image:alt | Crash report What happened? The following code causes a crash in cpython: class Generic: def __call__(*a): print(a) def __getattr__(self, name): return Generic() name_5 = Generic() type name_3[*nam... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | 15r10nk |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width