Title: Missing error handling in `_PyEval_GetFrameLocals` in `ceval.c` · Issue #118613 · python/cpython · GitHub
Open Graph Title: Missing error handling in `_PyEval_GetFrameLocals` in `ceval.c` · Issue #118613 · python/cpython
X Title: Missing error handling in `_PyEval_GetFrameLocals` in `ceval.c` · Issue #118613 · python/cpython
Description: Bug report Here's the problematic code: cpython/Python/ceval.c Lines 2497 to 2504 in d8d9491 if (PyFrameLocalsProxy_Check(locals)) { PyObject* ret = PyDict_New(); if (PyDict_Update(ret, locals)) { Py_DECREF(ret); return NULL; } Py_DECREF...
Open Graph Description: Bug report Here's the problematic code: cpython/Python/ceval.c Lines 2497 to 2504 in d8d9491 if (PyFrameLocalsProxy_Check(locals)) { PyObject* ret = PyDict_New(); if (PyDict_Update(ret, locals)) { ...
X Description: Bug report Here's the problematic code: cpython/Python/ceval.c Lines 2497 to 2504 in d8d9491 if (PyFrameLocalsProxy_Check(locals)) { PyObject* ret = PyDict_New(); if (PyDict_Update(ret, locals)...
Opengraph URL: https://github.com/python/cpython/issues/118613
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Missing error handling in `_PyEval_GetFrameLocals` in `ceval.c`","articleBody":"# Bug report\n\nHere's the problematic code: https://github.com/python/cpython/blob/d8d94911e2393bd30ca58a32b33d792307fdc00d/Python/ceval.c#L2497-L2504\n\nWhat's wrong?\n1. `PyDict_New()` can return `NULL`, it is not checked\n2. `Py_DECREF(locals);` is only called on success, but not on error\n\n\nRefs https://github.com/python/cpython/commit/b034f14a4b6e9197d3926046721b8b4b4b4f5b3d\n\nI have a PR ready.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-118614\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2024-05-05T21:27:03Z","url":"https://github.com/python/cpython/issues/118613"}
| 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:d97071a5-6f1b-0d5e-94f2-8bebf26c0282 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CC22:F7748:1618E8:1C968C:6B028EDB |
| html-safe-nonce | c2648aea29bbee9c2a9b5609d8a72c47bbd3a57d612053299ab25184365cd706 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQzIyOkY3NzQ4OjE2MThFODoxQzk2OEM6NkIwMjhFREIiLCJ2aXNpdG9yX2lkIjoiNDAxNDMyODkzNzc2NDI2MTU5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 37a8f5745b61b7372f150bc88e9af46e9028a9c7016860b628e856bba053ebd6 |
| hovercard-subject-tag | issue:2279739971 |
| 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/118613/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b46e5edfba0defde33cd5334f8535ec0456f48c000a8f626405e29c372638aab/python/cpython/issues/118613 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b46e5edfba0defde33cd5334f8535ec0456f48c000a8f626405e29c372638aab/python/cpython/issues/118613 |
| og:image:alt | Bug report Here's the problematic code: cpython/Python/ceval.c Lines 2497 to 2504 in d8d9491 if (PyFrameLocalsProxy_Check(locals)) { PyObject* ret = PyDict_New(); if (PyDict_Update(ret, locals)) { ... |
| 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 | 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