Title: structseq.c: NULL dereference in get_type_attr_as_size · Issue #148119 · python/cpython · GitHub
Open Graph Title: structseq.c: NULL dereference in get_type_attr_as_size · Issue #148119 · python/cpython
X Title: structseq.c: NULL dereference in get_type_attr_as_size · Issue #148119 · python/cpython
Description: Bug report Bug description: Parent: #146102 When PyDict_GetItemWithError returns NULL due to error (not missing key), code falls through to PyLong_AsSsize_t(NULL) at line 37 → segfault. Affects PyStructSequence_New, structseq_new_impl, e...
Open Graph Description: Bug report Bug description: Parent: #146102 When PyDict_GetItemWithError returns NULL due to error (not missing key), code falls through to PyLong_AsSsize_t(NULL) at line 37 → segfault. Affects PyS...
X Description: Bug report Bug description: Parent: #146102 When PyDict_GetItemWithError returns NULL due to error (not missing key), code falls through to PyLong_AsSsize_t(NULL) at line 37 → segfault. Affects PyS...
Opengraph URL: https://github.com/python/cpython/issues/148119
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"structseq.c: NULL dereference in get_type_attr_as_size","articleBody":"# Bug report\n\n### Bug description:\n\nParent: #146102 \n\nWhen `PyDict_GetItemWithError` returns NULL due to error (not missing key), code falls through to `PyLong_AsSsize_t(NULL)` at line 37 → segfault. Affects `PyStructSequence_New`, `structseq_new_impl`, etc.\n\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-148120\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Wulian233","@type":"Person","name":"Wulian233"},"datePublished":"2026-04-05T03:11:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/148119/cpython/issues/148119"}
| 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:a27543d1-e4fc-8bca-cd42-1780ab6b8b19 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B01A:20C1D0:2D4A82:3CBCC8:6A514106 |
| html-safe-nonce | ba982c2724cf7f41c624117aa3fcb6a54875c8fdb484fdcd342cff0ee9879626 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDFBOjIwQzFEMDoyRDRBODI6M0NCQ0M4OjZBNTE0MTA2IiwidmlzaXRvcl9pZCI6IjQxMjc5MDI0MjAxMTMxMTMzNTAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 95a18dc1a7aa798653f5648858a55064814bbedd404f880ebc6142ebc5061a27 |
| hovercard-subject-tag | issue:4206323349 |
| 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/148119/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e62e60d8042c568b6d99a7fc56d922fed7f3f5d8a29debb1708a926da472fd38/python/cpython/issues/148119 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e62e60d8042c568b6d99a7fc56d922fed7f3f5d8a29debb1708a926da472fd38/python/cpython/issues/148119 |
| og:image:alt | Bug report Bug description: Parent: #146102 When PyDict_GetItemWithError returns NULL due to error (not missing key), code falls through to PyLong_AsSsize_t(NULL) at line 37 → segfault. Affects PyS... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Wulian233 |
| hostname | github.com |
| expected-hostname | github.com |
| None | e840f405b2718e8f2d55aafa9ff27dbce17e29d0c253011d05ea0fea3c78baff |
| 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 | e876f00c5723f6080b9d294e4958fd4d506e6faf |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width