Title: bpo-36531: Only count number of members once in PyType_FromSpec by eduardo-elizondo · Pull Request #12691 · python/cpython · GitHub
Open Graph Title: bpo-36531: Only count number of members once in PyType_FromSpec by eduardo-elizondo · Pull Request #12691 · python/cpython
X Title: bpo-36531: Only count number of members once in PyType_FromSpec by eduardo-elizondo · Pull Request #12691 · python/cpython
Description: If a user accidentally defined more than one Py_tp_members in the spec, PyType_FromSpec will ignore all but the last use case. However, the number of members count will cause the type to allocate more memory than needed. This leads to weird behavior and crashes. This is a simple one line solution to make the type initialization safer. https://bugs.python.org/issue36531
Open Graph Description: If a user accidentally defined more than one Py_tp_members in the spec, PyType_FromSpec will ignore all but the last use case. However, the number of members count will cause the type to allocate m...
X Description: If a user accidentally defined more than one Py_tp_members in the spec, PyType_FromSpec will ignore all but the last use case. However, the number of members count will cause the type to allocate m...
Opengraph URL: https://github.com/python/cpython/pull/12691
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3fc16524-972e-8bce-2f88-2a7ff4e064e2 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A642:CED76:CEA5E8:11E503E:696A8BF4 |
| html-safe-nonce | 41dfc97b10ed31c5e1495add0043c28170de93b5efe88e7b1445f98e872cce4d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjQyOkNFRDc2OkNFQTVFODoxMUU1MDNFOjY5NkE4QkY0IiwidmlzaXRvcl9pZCI6IjIwMzYyNzMyMTk3NTk2NzIzMDgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 625023c0fb58fe76e364f0c8c1d2aa0117c2826065f6435b2bfec9b3061117ef |
| hovercard-subject-tag | pull_request:267650691 |
| 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/12691/files |
| twitter:image | https://avatars.githubusercontent.com/u/5315899?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/5315899?s=400&v=4 |
| og:image:alt | If a user accidentally defined more than one Py_tp_members in the spec, PyType_FromSpec will ignore all but the last use case. However, the number of members count will cause the type to allocate m... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | d2aa6dedd7d97fa651b17c40401f2605f309df5ca5fb659bf0554cf34f1de825 |
| 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 | c1dbca8981c5e3d6a69bce2f1d289e732b86241d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width