René's URL Explorer Experiment


Title: Clear borrowed C pointers before re-initializing Packer and Unpacker by ravi0800 · Pull Request #776 · msgpack/msgpack-python · GitHub

Open Graph Title: Clear borrowed C pointers before re-initializing Packer and Unpacker by ravi0800 · Pull Request #776 · msgpack/msgpack-python

X Title: Clear borrowed C pointers before re-initializing Packer and Unpacker by ravi0800 · Pull Request #776 · msgpack/msgpack-python

Description: Packer.__init__ and Unpacker.__init__ replace the attributes that own unicode_errors and the object/list/ext hooks before the C side pointers borrowed from them are refreshed. When a later step of a re-__init__ raises (for example unicode_errors=1, or read_size > max_buffer_size), the old objects are already released, so the next unpack() calls a freed object_hook (access violation on CPython 3.10/Windows) and the next pack() passes a freed error handler name to PyUnicode_AsEncodedString. In Unpacker the failed path can also keep the old buf_size/buf_head/buf_tail after self.buf was freed, so feed() copies into a NULL buffer. Clear the borrowed pointers and the buffer bookkeeping at the top of __init__, before their owners are replaced, so a failed __init__ leaves the object with no hooks and an empty buffer instead of dangling state. The two new tests crash or fail on main and pass here; the full suite passes for both the C extension and MSGPACK_PUREPYTHON=1.

Open Graph Description: Packer.__init__ and Unpacker.__init__ replace the attributes that own unicode_errors and the object/list/ext hooks before the C side pointers borrowed from them are refreshed. When a later step of ...

X Description: Packer.__init__ and Unpacker.__init__ replace the attributes that own unicode_errors and the object/list/ext hooks before the C side pointers borrowed from them are refreshed. When a later step of ...

Opengraph URL: https://github.com/msgpack/msgpack-python/pull/776

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9eb0cf9f-bc08-83c4-4d80-adf7f5cb9b54
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id883A:186C97:304908:3F1AE1:6B076233
html-safe-nonce71b9fc0f61ca367fde2a122d1b520a4eb5c71a86481cc8f5b36e831c38a1fcd2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODNBOjE4NkM5NzozMDQ5MDg6M0YxQUUxOjZCMDc2MjMzIiwidmlzaXRvcl9pZCI6IjM4NzI5MzAyNDM0ODg5OTc5MzkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmace4c531c51fabeedfb08ac1a9576fcf5434c490d9dcb40b6900f63e47eacabcbf
hovercard-subject-tagpull_request:5449040289
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/msgpack/msgpack-python/pull/776/files
twitter:imagehttps://avatars.githubusercontent.com/u/307217163?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/307217163?s=400&v=4
og:image:altPacker.__init__ and Unpacker.__init__ replace the attributes that own unicode_errors and the object/list/ext hooks before the C side pointers borrowed from them are refreshed. When a later step of ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7a557ecc960a3ae6e299fc66b0bc9132072f8860191648e6749fee5d3ff00d82
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/msgpack/msgpack-python git https://github.com/msgpack/msgpack-python.git
octolytics-dimension-user_id198264
octolytics-dimension-user_loginmsgpack
octolytics-dimension-repository_id2242705
octolytics-dimension-repository_nwomsgpack/msgpack-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id2242705
octolytics-dimension-repository_network_root_nwomsgpack/msgpack-python
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasebd845eb7947c1ed8c850f7ab415a51339d162de3
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/msgpack/msgpack-python/pull/776/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmsgpack%2Fmsgpack-python%2Fpull%2F776%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmsgpack%2Fmsgpack-python%2Fpull%2F776%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=msgpack%2Fmsgpack-python
Reloadhttps://github.com/msgpack/msgpack-python/pull/776/files
Reloadhttps://github.com/msgpack/msgpack-python/pull/776/files
Reloadhttps://github.com/msgpack/msgpack-python/pull/776/files
msgpackhttps://github.com/msgpack
msgpack-pythonhttps://github.com/msgpack/msgpack-python
Codehttps://github.com/msgpack/msgpack-python
Issues5 (5)https://github.com/msgpack/msgpack-python/issues
Pull requests21 (21)https://github.com/msgpack/msgpack-python/pulls
Discussionshttps://github.com/msgpack/msgpack-python/discussions
Actionshttps://github.com/msgpack/msgpack-python/actions
Security and quality2 (2)https://github.com/msgpack/msgpack-python/security
Insightshttps://github.com/msgpack/msgpack-python/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmsgpack%2Fmsgpack-python%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmsgpack%2Fmsgpack-python%2Fissues%2Fnew%2Fchoose
ravi0800https://github.com/ravi0800
msgpack:mainhttps://github.com/msgpack/msgpack-python/tree/main
ravi0800:reinit-borrowed-pointershttps://github.com/ravi0800/msgpack-python/tree/reinit-borrowed-pointers
Conversation 1 https://github.com/msgpack/msgpack-python/pull/776
Commits 1 https://github.com/msgpack/msgpack-python/pull/776/commits
Checks 50 https://github.com/msgpack/msgpack-python/pull/776/checks
Files changed https://github.com/msgpack/msgpack-python/pull/776/files
Please reload this pagehttps://github.com/msgpack/msgpack-python/pull/776/files
Clear borrowed C pointers before re-initializing Packer and Unpacker https://github.com/msgpack/msgpack-python/pull/776/files#top
Show all changes 1 commit https://github.com/msgpack/msgpack-python/pull/776/files
9b4483d Clear borrowed C pointers before re-initializing Packer and Unpacker ravi0800 Nov 20, 2026 https://github.com/msgpack/msgpack-python/pull/776/commits/9b4483d19bad3875940b477e49d45c58873c3c7f
Clear filters https://github.com/msgpack/msgpack-python/pull/776/files
Please reload this pagehttps://github.com/msgpack/msgpack-python/pull/776/files
Please reload this pagehttps://github.com/msgpack/msgpack-python/pull/776/files
_packer.pyx https://github.com/msgpack/msgpack-python/pull/776/files#diff-7cc44ebbdabe0581aecc8e519e34b721b2be1dbf2f07eb53160ef8e6073dec3a
_unpacker.pyx https://github.com/msgpack/msgpack-python/pull/776/files#diff-407b1aba76cd8909a978c41341f7fe756567d21c6dab7c7568ca6075614531b1
test_pack.py https://github.com/msgpack/msgpack-python/pull/776/files#diff-5eef35562d420d353fe69f68a2bbbc9d15a8d2428f073b42607b3145513639f0
test_unpack.py https://github.com/msgpack/msgpack-python/pull/776/files#diff-a38bda78674f20f297abfaafa9134ac6025345225b79c4c0012aa592740c2c7d
msgpack/_packer.pyxhttps://github.com/msgpack/msgpack-python/pull/776/files#diff-7cc44ebbdabe0581aecc8e519e34b721b2be1dbf2f07eb53160ef8e6073dec3a
View file https://github.com/msgpack/msgpack-python/blob/9b4483d19bad3875940b477e49d45c58873c3c7f/msgpack/_packer.pyx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/msgpack/msgpack-python/pull/776/{{ revealButtonHref }}
https://github.com/msgpack/msgpack-python/pull/776/files#diff-7cc44ebbdabe0581aecc8e519e34b721b2be1dbf2f07eb53160ef8e6073dec3a
https://github.com/msgpack/msgpack-python/pull/776/files#diff-7cc44ebbdabe0581aecc8e519e34b721b2be1dbf2f07eb53160ef8e6073dec3a
msgpack/_unpacker.pyxhttps://github.com/msgpack/msgpack-python/pull/776/files#diff-407b1aba76cd8909a978c41341f7fe756567d21c6dab7c7568ca6075614531b1
View file https://github.com/msgpack/msgpack-python/blob/9b4483d19bad3875940b477e49d45c58873c3c7f/msgpack/_unpacker.pyx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/msgpack/msgpack-python/pull/776/{{ revealButtonHref }}
https://github.com/msgpack/msgpack-python/pull/776/files#diff-407b1aba76cd8909a978c41341f7fe756567d21c6dab7c7568ca6075614531b1
https://github.com/msgpack/msgpack-python/pull/776/files#diff-407b1aba76cd8909a978c41341f7fe756567d21c6dab7c7568ca6075614531b1
test/test_pack.pyhttps://github.com/msgpack/msgpack-python/pull/776/files#diff-5eef35562d420d353fe69f68a2bbbc9d15a8d2428f073b42607b3145513639f0
View file https://github.com/msgpack/msgpack-python/blob/9b4483d19bad3875940b477e49d45c58873c3c7f/test/test_pack.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/msgpack/msgpack-python/pull/776/{{ revealButtonHref }}
https://github.com/msgpack/msgpack-python/pull/776/files#diff-5eef35562d420d353fe69f68a2bbbc9d15a8d2428f073b42607b3145513639f0
test/test_unpack.pyhttps://github.com/msgpack/msgpack-python/pull/776/files#diff-a38bda78674f20f297abfaafa9134ac6025345225b79c4c0012aa592740c2c7d
View file https://github.com/msgpack/msgpack-python/blob/9b4483d19bad3875940b477e49d45c58873c3c7f/test/test_unpack.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/msgpack/msgpack-python/pull/776/{{ revealButtonHref }}
https://github.com/msgpack/msgpack-python/pull/776/files#diff-a38bda78674f20f297abfaafa9134ac6025345225b79c4c0012aa592740c2c7d
Please reload this pagehttps://github.com/msgpack/msgpack-python/pull/776/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.