Title: marshal.c: 8 refs leaked on corrupt TYPE_CODE marshal stream · Issue #148418 · python/cpython · GitHub
Open Graph Title: marshal.c: 8 refs leaked on corrupt TYPE_CODE marshal stream · Issue #148418 · python/cpython
X Title: marshal.c: 8 refs leaked on corrupt TYPE_CODE marshal stream · Issue #148418 · python/cpython
Description: Bug report Bug description: Parent: #146121 https://gist.github.com/devdanzin/60b787bfa22651ba6a18aef3b6e1439d/raw/5b12fb962510aed36b457ae3670424bbb91ecacd/marshal_type_code_leak.md In r_object TYPE_CODE case (line 1601-1602), when first...
Open Graph Description: Bug report Bug description: Parent: #146121 https://gist.github.com/devdanzin/60b787bfa22651ba6a18aef3b6e1439d/raw/5b12fb962510aed36b457ae3670424bbb91ecacd/marshal_type_code_leak.md In r_object TYP...
X Description: Bug report Bug description: Parent: #146121 https://gist.github.com/devdanzin/60b787bfa22651ba6a18aef3b6e1439d/raw/5b12fb962510aed36b457ae3670424bbb91ecacd/marshal_type_code_leak.md In r_object TYP...
Opengraph URL: https://github.com/python/cpython/issues/148418
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"marshal.c: 8 refs leaked on corrupt TYPE_CODE marshal stream","articleBody":"# Bug report\n\n### Bug description:\n\nParent: #146121 \n\nhttps://gist.github.com/devdanzin/60b787bfa22651ba6a18aef3b6e1439d/raw/5b12fb962510aed36b457ae3670424bbb91ecacd/marshal_type_code_leak.md\n\nIn `r_object` TYPE_CODE case (line 1601-1602), when `firstlineno == -1 \u0026\u0026 PyErr_Occurred()`, code does `break` instead of `goto code_error`. Skips cleanup of 8 owned refs. Reachable via `marshal.loads()` with crafted input.\n\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\n_No response_\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-148419\n* gh-149363\n* gh-149364\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/Wulian233","@type":"Person","name":"Wulian233"},"datePublished":"2026-04-12T02:23:35.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/148418/cpython/issues/148418"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:7ccf61b3-ebc9-8e8e-15a7-4f3e17aa1d77 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9D28:3DB5EE:220310B:2F81944:6A50BA9A |
| html-safe-nonce | 78678bdd4cd8f15f2b18d03f28ad1230a6d7e04de4a039f9569e61fabf515c2c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RDI4OjNEQjVFRToyMjAzMTBCOjJGODE5NDQ6NkE1MEJBOUEiLCJ2aXNpdG9yX2lkIjoiNzY5ODQxNzg1NDM4NTE3OTE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | da585c84f1b29eafb37e142a37cf55947aae1d42be50a5e97ea243de2c47d7e0 |
| hovercard-subject-tag | issue:4246250097 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/148418/issue_layout |
| twitter:image | https://opengraph.githubassets.com/aa55f85ff369b46bbe846cc1638cd365716fd533588c20827b37e851bd06d339/python/cpython/issues/148418 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/aa55f85ff369b46bbe846cc1638cd365716fd533588c20827b37e851bd06d339/python/cpython/issues/148418 |
| og:image:alt | Bug report Bug description: Parent: #146121 https://gist.github.com/devdanzin/60b787bfa22651ba6a18aef3b6e1439d/raw/5b12fb962510aed36b457ae3670424bbb91ecacd/marshal_type_code_leak.md In r_object TYP... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Wulian233 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 08e79d53fc070870d5b168356afebb1e286a2ffe |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width