Title: Missing error handling in `SET_COUNT` macro in `_testinternalcapi.c` · Issue #133891 · python/cpython · GitHub
Open Graph Title: Missing error handling in `SET_COUNT` macro in `_testinternalcapi.c` · Issue #133891 · python/cpython
X Title: Missing error handling in `SET_COUNT` macro in `_testinternalcapi.c` · Issue #133891 · python/cpython
Description: Bug report Refs #133265 Right here PyLong_FromLong can in theory (unlikely in practice) return NULL. It is missing this check. I understand that this is a test code, but I also don't see a reason why we should not be explicit about it. c...
Open Graph Description: Bug report Refs #133265 Right here PyLong_FromLong can in theory (unlikely in practice) return NULL. It is missing this check. I understand that this is a test code, but I also don't see a reason w...
X Description: Bug report Refs #133265 Right here PyLong_FromLong can in theory (unlikely in practice) return NULL. It is missing this check. I understand that this is a test code, but I also don't see a reas...
Opengraph URL: https://github.com/python/cpython/issues/133891
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing error handling in `SET_COUNT` macro in `_testinternalcapi.c`","articleBody":"# Bug report\n\nRefs https://github.com/python/cpython/pull/133265\n\nRight here `PyLong_FromLong` can in theory (unlikely in practice) return `NULL`. It is missing this check. I understand that this is a test code, but I also don't see a reason why we should not be explicit about it.\n\nhttps://github.com/python/cpython/blob/13cb8ca3da75d6fe2a1114e58c24ca681fee411f/Modules/_testinternalcapi.c#L1045\n\ncc @ericsnowcurrently \n\nI have a PR ready.\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-133892\n* gh-134988\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2025-05-11T11:41:36.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/133891/cpython/issues/133891"}
| 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:874c6617-ebec-a45c-9421-394c5608d3c2 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D2A4:E194E:E5928E:12FDA24:696B626F |
| html-safe-nonce | 8e1acd2017355708909ddb6086bab7f837f4d53a8ae372f7871a44a32f83d49f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMkE0OkUxOTRFOkU1OTI4RToxMkZEQTI0OjY5NkI2MjZGIiwidmlzaXRvcl9pZCI6IjQyOTY2NTc5NzcyODQ5NzcyNjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 0bfac8dda7efc91dba739b91e10ffd0ec0e7c537ad6b2d7f6db7ac8264f54e84 |
| hovercard-subject-tag | issue:3054937053 |
| 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/133891/issue_layout |
| twitter:image | https://opengraph.githubassets.com/35f717d95309fbda9253c137f241f7f94e7b13f6f3cc4d26c0da25482a01efc4/python/cpython/issues/133891 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/35f717d95309fbda9253c137f241f7f94e7b13f6f3cc4d26c0da25482a01efc4/python/cpython/issues/133891 |
| og:image:alt | Bug report Refs #133265 Right here PyLong_FromLong can in theory (unlikely in practice) return NULL. It is missing this check. I understand that this is a test code, but I also don't see a reason w... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width