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/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:7a78e245-6009-d5be-878e-7c157980a54e |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | CBF2:E3F0D:2C3480C:39BB9AE:696B72E8 |
| html-safe-nonce | 377a3b2e2a7be86bcd50c41e29c2a0361a09d373f35ec7bc7c943a2e8438cf8c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQkYyOkUzRjBEOjJDMzQ4MEM6MzlCQjlBRTo2OTZCNzJFOCIsInZpc2l0b3JfaWQiOiIzMzY1NDA3NDE0MjI2MjE5NzUyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 653396cf8f7cc6114a368647219ca1cd4ca68d2e8924d57131d9ef15dd5895b0 |
| hovercard-subject-tag | pull_request:124574345 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/checks |
| 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 |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| 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