Title: Fixed segfault in ClassDerived.tp_dealloc by lostmsu · Pull Request #1330 · pythonnet/pythonnet · GitHub
Open Graph Title: Fixed segfault in ClassDerived.tp_dealloc by lostmsu · Pull Request #1330 · pythonnet/pythonnet
X Title: Fixed segfault in ClassDerived.tp_dealloc by lostmsu · Pull Request #1330 · pythonnet/pythonnet
Description: What caused the problem + fixes All reflected .NET types stored GCHandle pointing to their implementations past the last byte of PyTypeObject. By adding IntPtr.Size to the size of PyTypeObject for CLR metatype we ensure, that the necessary space is allocated without relying on Python never writing immediately after type instances. In ClassDerivedObject tp_dealloc tried to use tpHandle which was previously NULLed in tp_clear. Fortunately, tpHandle in ClassDerivedObject is merely a duplicate of PyObject_TYPE(pyHandle), so could be read from there. Does this close any currently open issues? #1327
Open Graph Description: What caused the problem + fixes All reflected .NET types stored GCHandle pointing to their implementations past the last byte of PyTypeObject. By adding IntPtr.Size to the size of PyTypeObject fo...
X Description: What caused the problem + fixes All reflected .NET types stored GCHandle pointing to their implementations past the last byte of PyTypeObject. By adding IntPtr.Size to the size of PyTypeObject fo...
Opengraph URL: https://github.com/pythonnet/pythonnet/pull/1330
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:fdd55371-3fff-efa3-f1f7-b24654fb68a2 |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 9C7C:22E260:312B9B4:420761E:697065EC |
| html-safe-nonce | dd50d7cf78fe6326d3303c926e9ba9bfc765264699d6a3222ffb0e660d8f658a |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QzdDOjIyRTI2MDozMTJCOUI0OjQyMDc2MUU6Njk3MDY1RUMiLCJ2aXNpdG9yX2lkIjoiNTk2ODgxMDczNTU3NDIxNDEyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ca0902318364d4761f3c5eea46ba6b4ce3a5f691b4a361da5507aee739211515 |
| hovercard-subject-tag | pull_request:542144056 |
| 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/1330/checks |
| twitter:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/239520?s=400&v=4 |
| og:image:alt | What caused the problem + fixes All reflected .NET types stored GCHandle pointing to their implementations past the last byte of PyTypeObject. By adding IntPtr.Size to the size of PyTypeObject fo... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| 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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width