Title: bpo-30594: Fix spurious DECREF in newPySSLSocket by njsmith · Pull Request #1992 · python/cpython · GitHub
Open Graph Title: bpo-30594: Fix spurious DECREF in newPySSLSocket by njsmith · Pull Request #1992 · python/cpython
X Title: bpo-30594: Fix spurious DECREF in newPySSLSocket by njsmith · Pull Request #1992 · python/cpython
Description: In newPySSLSocket, it sets up the new 'self' object, which among other things owns a reference to the parent SSLContext in 'self->ctx'. It then tries to idna-decode the given server_hostname, and if this fails it does Py_DECREF(self) and returns. The Py_DECREF(self) causes the PySSLSocket destructor to run, which calls Py_DECREF(self->ctx), which releases the reference to the parent SSLContext object. However... as currently written, we don't actually take the reference to the parent SSLContext until after the idna-decoding step. I.e., this does a Py_DECREF on an object that was never Py_INCREFed. Eventually we get a segfault.
Open Graph Description: In newPySSLSocket, it sets up the new 'self' object, which among other things owns a reference to the parent SSLContext in 'self->ctx'. It then tries to idna-decode the given ser...
X Description: In newPySSLSocket, it sets up the new 'self' object, which among other things owns a reference to the parent SSLContext in 'self->ctx'. It then tries to idna-...
Opengraph URL: https://github.com/python/cpython/pull/1992
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:788a74de-8c64-66b3-501f-5def7471b4c7 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9A0C:2B1AB1:2AE2CC8:3857366:696B723E |
| html-safe-nonce | 0c9d7f94f9ad84d5380f6290aeb215bde45c945a863352676cea4e9b1c9e86d1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTBDOjJCMUFCMToyQUUyQ0M4OjM4NTczNjY6Njk2QjcyM0UiLCJ2aXNpdG9yX2lkIjoiMTIwMjAxMDM5NTczNjQzODM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 5514800b41734bb4c1b51b477d1af9599585603db0a99e0a8cff255db3552172 |
| hovercard-subject-tag | pull_request:124574345 |
| 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/1992/files |
| twitter:image | https://avatars.githubusercontent.com/u/609896?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/609896?s=400&v=4 |
| og:image:alt | In newPySSLSocket, it sets up the new 'self' object, which among other things owns a reference to the parent SSLContext in 'self->ctx'. It then tries to idna-decode the given ser... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| 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 | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width