Title: Use of uninitialized pointer in Argument Clinic generated code · Issue #97728 · python/cpython · GitHub
Open Graph Title: Use of uninitialized pointer in Argument Clinic generated code · Issue #97728 · python/cpython
X Title: Use of uninitialized pointer in Argument Clinic generated code · Issue #97728 · python/cpython
Description: The code generated for the Py_UNICODE converter (and derived converter LPCWSTR) looks like: const Py_UNICODE *name; ... if (!_PyArg_ParseXXX(..., name, ...)) { goto exit; } ... exit: PyMem_Free((void *)name); If parsing fails, PyMem_Free...
Open Graph Description: The code generated for the Py_UNICODE converter (and derived converter LPCWSTR) looks like: const Py_UNICODE *name; ... if (!_PyArg_ParseXXX(..., name, ...)) { goto exit; } ... exit: PyMem_Free((vo...
X Description: The code generated for the Py_UNICODE converter (and derived converter LPCWSTR) looks like: const Py_UNICODE *name; ... if (!_PyArg_ParseXXX(..., name, ...)) { goto exit; } ... exit: PyMem_Free((vo...
Opengraph URL: https://github.com/python/cpython/issues/97728
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Use of uninitialized pointer in Argument Clinic generated code","articleBody":"The code generated for the Py_UNICODE converter (and derived converter LPCWSTR) looks like:\r\n```c\r\nconst Py_UNICODE *name;\r\n...\r\nif (!_PyArg_ParseXXX(..., name, ...)) {\r\n goto exit;\r\n}\r\n...\r\nexit:\r\n PyMem_Free((void *)name);\r\n```\r\nIf parsing fails, `PyMem_Free()` is called for uninitialized variable.\r\n\r\nIt is the only converter with non-trivial cleanup which does not have a mandatory initializer.","author":{"url":"https://github.com/serhiy-storchaka","@type":"Person","name":"serhiy-storchaka"},"datePublished":"2022-10-02T08:31:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/97728/cpython/issues/97728"}
| 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:2c4c609f-8f65-b732-fbae-9f80815efe53 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DEF4:873B8:E79AEA:13BBF39:69693CF6 |
| html-safe-nonce | 096269aa8923f84d717478202ce85ff6f5e738ec1d1674024dbf2bbf54b1bf37 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUY0Ojg3M0I4OkU3OUFFQToxM0JCRjM5OjY5NjkzQ0Y2IiwidmlzaXRvcl9pZCI6IjE1MzE0MzEyMjQxMDc0MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d9c847d4be9dbbc8842aacfb6062ca4231db9177b2aabda8ca0233ab543e6a41 |
| hovercard-subject-tag | issue:1393687159 |
| 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/97728/issue_layout |
| twitter:image | https://opengraph.githubassets.com/13103d0dbcfd322c7aa312891aa49d8d6faf2376668b28d18a2a68514ad75c10/python/cpython/issues/97728 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/13103d0dbcfd322c7aa312891aa49d8d6faf2376668b28d18a2a68514ad75c10/python/cpython/issues/97728 |
| og:image:alt | The code generated for the Py_UNICODE converter (and derived converter LPCWSTR) looks like: const Py_UNICODE *name; ... if (!_PyArg_ParseXXX(..., name, ...)) { goto exit; } ... exit: PyMem_Free((vo... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | serhiy-storchaka |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width