Title: Fix exception refcnt by BadSingleton · Pull Request #1402 · pythonnet/pythonnet · GitHub
Open Graph Title: Fix exception refcnt by BadSingleton · Pull Request #1402 · pythonnet/pythonnet
X Title: Fix exception refcnt by BadSingleton · Pull Request #1402 · pythonnet/pythonnet
Description: What does this implement/fix? Explain your changes. Adds a tp_dealloc function to ExceptionClassObject, so we clean the BaseException members the same way as other the derived exceptions in the cpython code does. Does this close any currently open issues? Fixes issue #1371. Any other comments? Fixes a bug where C# Exceptions set as the Inner of another C# Exception, then converted into a Python exception object (and thus having __cause__ set to a valid object) would leak the Inner/__cause__ objects. Simplified diagram : AggregateException.Inner -> ArgumentException(...) ^ ^ | | PyAggregateException.__cause__ -> PyArgumentException In this case, where the AggregateException would be thrown from C# and caught in Python, the AggregateException and PyAggregateException would be freed, but not the ArgumentException set as the cause. Checklist Check all those that are applicable and complete. Make sure to include one or more tests for your change If an enhancement PR, please create docs and at best an example Add yourself to AUTHORS Updated the CHANGELOG
Open Graph Description: What does this implement/fix? Explain your changes. Adds a tp_dealloc function to ExceptionClassObject, so we clean the BaseException members the same way as other the derived exceptions in the cpy...
X Description: What does this implement/fix? Explain your changes. Adds a tp_dealloc function to ExceptionClassObject, so we clean the BaseException members the same way as other the derived exceptions in the cpy...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1402
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:b13dca86-29c2-6d1d-8e6f-3eb300c2b2d4 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 90FE:35E6BA:1870869:222A174:6970DBD9 |
| html-safe-nonce | a8b6f41235c3fe7a1faac350afb1873e8c757c654f06a194fb85cf6cb2099976 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MEZFOjM1RTZCQToxODcwODY5OjIyMkExNzQ6Njk3MERCRDkiLCJ2aXNpdG9yX2lkIjoiNzY3NjM4OTAyODM2NTY1NTAwMSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 1d9f9c450ffc83dabf38cf5539d9e6c831117c3a330fac30744640c0b6cd7cba |
| hovercard-subject-tag | pull_request:582112943 |
| 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/pythonnet/pythonnet/pull/1402/checks |
| twitter:image | https://avatars.githubusercontent.com/u/6788684?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/6788684?s=400&v=4 |
| og:image:alt | What does this implement/fix? Explain your changes. Adds a tp_dealloc function to ExceptionClassObject, so we clean the BaseException members the same way as other the derived exceptions in the cpy... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9203e7efc62065329c3b7015a1e6d16fc14bce440abec7b0d3cbe9e4fb1e2e4 |
| turbo-cache-control | no-preview |
| go-import | github.com/pythonnet/pythonnet git https://github.com/pythonnet/pythonnet.git |
| octolytics-dimension-user_id | 6050430 |
| octolytics-dimension-user_login | pythonnet |
| octolytics-dimension-repository_id | 14748123 |
| octolytics-dimension-repository_nwo | pythonnet/pythonnet |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14748123 |
| octolytics-dimension-repository_network_root_nwo | pythonnet/pythonnet |
| 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 | eb3c92b74ae48a78cffd8700b8eb5f60bad61528 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width