Title: [WIP] bpo-31626: Rewrite _PyMem_DebugRawRealloc() by vstinner · Pull Request #3898 · python/cpython · GitHub
Open Graph Title: [WIP] bpo-31626: Rewrite _PyMem_DebugRawRealloc() by vstinner · Pull Request #3898 · python/cpython
X Title: [WIP] bpo-31626: Rewrite _PyMem_DebugRawRealloc() by vstinner · Pull Request #3898 · python/cpython
Description: Previously, _PyMem_DebugRawRealloc() expected that the old memory block remains readable and unchanged after realloc(). This assumption is wrong on OpenBSD. Rewrite _PyMem_DebugRawRealloc() as malloc()+free() rather than realloc(). Debug hooks are reused. The old memory block remains valid after the new memory block was allocated, so bytes can be safely copied in a portable way. The drawback is that _PyMem_DebugRawRealloc() now allocates a new memory block while the old memory block remains allocated, until the old memory block is freed, so the peak memory usage can be the double in the worst case. The second drawback is that the system realloc() is no more used in debug mode. https://bugs.python.org/issue31626
Open Graph Description: Previously, _PyMem_DebugRawRealloc() expected that the old memory block remains readable and unchanged after realloc(). This assumption is wrong on OpenBSD. Rewrite _PyMem_DebugRawRealloc() as mall...
X Description: Previously, _PyMem_DebugRawRealloc() expected that the old memory block remains readable and unchanged after realloc(). This assumption is wrong on OpenBSD. Rewrite _PyMem_DebugRawRealloc() as mall...
Opengraph URL: https://github.com/python/cpython/pull/3898
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1d6c3e6e-d002-a085-f5e1-b04cf2c60185 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | CCAA:18C93:476138D:6432F57:6A4F77D3 |
| html-safe-nonce | 06b8652b7740eaa30286dd8dcc2c0e03dccef906c7a229294179d420af54082d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDQ0FBOjE4QzkzOjQ3NjEzOEQ6NjQzMkY1Nzo2QTRGNzdEMyIsInZpc2l0b3JfaWQiOiIxMTY0MTk1NjM2NjI4NjQ5OTM5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | b55163e5b6524aeb2d56ef50b7d33042ea8f6f8a4b379287987e4b1f1802988f |
| hovercard-subject-tag | pull_request:144967287 |
| 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/3898/files |
| twitter:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/194129?s=400&v=4 |
| og:image:alt | Previously, _PyMem_DebugRawRealloc() expected that the old memory block remains readable and unchanged after realloc(). This assumption is wrong on OpenBSD. Rewrite _PyMem_DebugRawRealloc() as mall... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | b92d11c0aa4a77d54ef4af1078b6a15fb5a70a215b30c4ecf28889d5a8e656d9 |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 4b249b445842943ed31549e027f57a8ade9881ed |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width