Title: Missing error checks in `_PyEval_MatchClass` · Issue #110237 · python/cpython · GitHub
Open Graph Title: Missing error checks in `_PyEval_MatchClass` · Issue #110237 · python/cpython
X Title: Missing error checks in `_PyEval_MatchClass` · Issue #110237 · python/cpython
Description: Several places in _PyEval_MatchClass call PyList_Append without checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C13-L509C26). However, PyList_Append can ...
Open Graph Description: Several places in _PyEval_MatchClass call PyList_Append without checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C...
X Description: Several places in _PyEval_MatchClass call PyList_Append without checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C...
Opengraph URL: https://github.com/python/cpython/issues/110237
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing error checks in `_PyEval_MatchClass`","articleBody":"Several places in `_PyEval_MatchClass` call `PyList_Append` without checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C13-L509C26). However, `PyList_Append` can fail. It will only fail if we're out of memory or if we passed a non-list, so it's unlikely to come up in practice, but we should still check for errors.\r\n\r\ncc @brandtbucher for pattern matching\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-110238\n* gh-110511\n* gh-110512\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2023-10-02T20:02:08.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/110237/cpython/issues/110237"}
| 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:f05efea3-06b8-bf7f-2e26-2e8d48e9125e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AE92:210DE3:77C6C:AA6A5:696A3CF7 |
| html-safe-nonce | c9df763dc0c4289e82e7afc14b384ea51bc6415af259458919e744d9ca478ab9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRTkyOjIxMERFMzo3N0M2QzpBQTZBNTo2OTZBM0NGNyIsInZpc2l0b3JfaWQiOiI2NzA2NzUyMzU0MDEyMjQ5MzM1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 292870e5f4a849d7530dea27bd5ffa87c90437d0a3ad960a7e7e9d9afe502e3e |
| hovercard-subject-tag | issue:1922591729 |
| 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/110237/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7138dbd73099a93015c48f83df9fe56c0a6d760fa825ce1d75e91649de51c4a2/python/cpython/issues/110237 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7138dbd73099a93015c48f83df9fe56c0a6d760fa825ce1d75e91649de51c4a2/python/cpython/issues/110237 |
| og:image:alt | Several places in _PyEval_MatchClass call PyList_Append without checking the return value (e.g., https://github.com/python/cpython/blob/fc2cb86d210555d509debaeefd370d5331cd9d93/Python/ceval.c#L509C... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| 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 | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width