Title: gh-146355: Fix `main_module` ref leak in `_PyRun_SimpleStringFlagsWithName` by A0su · Pull Request #146356 · python/cpython · GitHub
Open Graph Title: gh-146355: Fix `main_module` ref leak in `_PyRun_SimpleStringFlagsWithName` by A0su · Pull Request #146356 · python/cpython
X Title: gh-146355: Fix `main_module` ref leak in `_PyRun_SimpleStringFlagsWithName` by A0su · Pull Request #146356 · python/cpython
Description: gh-146355: Fix main_module ref leak in _PyRun_SimpleStringFlagsWithName This is a sub-issue for #146102 and original gist details can be found here When the_name is NULL we'll fail to call Py_DECREF on main_module. I used the same goto pattern as _PyRun_SimpleFileObject to fix this. I omitted a new test entry as we have indirect coverage of functionality in test_embed.py. Not sure if it makes sense for the scope of fixing the ref leak to include the additional code for a test in test_run.py (which has a TODO for this function).
Open Graph Description: gh-146355: Fix main_module ref leak in _PyRun_SimpleStringFlagsWithName This is a sub-issue for #146102 and original gist details can be found here When the_name is NULL we'll fail to call Py_D...
X Description: gh-146355: Fix main_module ref leak in _PyRun_SimpleStringFlagsWithName This is a sub-issue for #146102 and original gist details can be found here When the_name is NULL we'll fail to call ...
Opengraph URL: https://github.com/python/cpython/pull/146356
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:51f9f56d-18b7-7ae3-4c8c-de16c255c72a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B65C:9C6CC:2069F71:2E108F1:6A50E861 |
| html-safe-nonce | 4dcf45f09439ad0b80f058ffb3c4c99429e26052250f9e4ebd8b58f75306bbbe |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjVDOjlDNkNDOjIwNjlGNzE6MkUxMDhGMTo2QTUwRTg2MSIsInZpc2l0b3JfaWQiOiIzOTY3Mjk1NTE5NjkzMjY5MDg5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d2ddc4d5ac138bf6eb0dfdf706b5f14c1f478d677d950ce1a133e02c5783e0d5 |
| hovercard-subject-tag | pull_request:3437109160 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/python/cpython/pull/146356/files |
| twitter:image | https://avatars.githubusercontent.com/u/43610414?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/43610414?s=400&v=4 |
| og:image:alt | gh-146355: Fix main_module ref leak in _PyRun_SimpleStringFlagsWithName This is a sub-issue for #146102 and original gist details can be found here When the_name is NULL we'll fail to call Py_D... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fb19d617b534959801b4b7453938ecf1dfa22131 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width