René's URL Explorer Experiment


Title: gh-157227: `_remote_debugging`: Validate lists and tuples in `write_sample` by maurycy · Pull Request #157228 · python/cpython · GitHub

Open Graph Title: gh-157227: `_remote_debugging`: Validate lists and tuples in `write_sample` by maurycy · Pull Request #157228 · python/cpython

X Title: gh-157227: `_remote_debugging`: Validate lists and tuples in `write_sample` by maurycy · Pull Request #157228 · python/cpython

Description: See #157227 for more details Basically, BinaryWriter.write_sample() only checks whether stack_frames is a list, and does PyList_GET_ITEM() / PyStructSequence_GET_ITEM() all the way. The PR adds a check for these containers. Now it's graceful: maurycy@gimel cpython (fix-remote-debugging-writer-validation aec95c2*) % ./python.exe Python 3.16.0a0 (heads/fix-remote-debugging-writer-validation-dirty:aec95c21726, Sep 9 2026, 20:) [Clang 21.0.0 (clang-2100.1.1.101)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import _remote_debugging >>> _remote_debugging.BinaryWriter("/tmp/o.bin", 1000, 1000000).write_sample([42], 2000) Traceback (most recent call last): File "", line 1, in _remote_debugging.BinaryWriter("/tmp/o.bin", 1000, 1000000).write_sample([42], 2000) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^ TypeError: interp_info must be a tuple of at least 2 items >>> instead of segmentation fault. Issue: gh-157227

Open Graph Description: See #157227 for more details Basically, BinaryWriter.write_sample() only checks whether stack_frames is a list, and does PyList_GET_ITEM() / PyStructSequence_GET_ITEM() all the way. The PR adds a c...

X Description: See #157227 for more details Basically, BinaryWriter.write_sample() only checks whether stack_frames is a list, and does PyList_GET_ITEM() / PyStructSequence_GET_ITEM() all the way. The PR adds a c...

Opengraph URL: https://github.com/python/cpython/pull/157228

X: @github

direct link

Domain: github.com

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:0209dd3c-7116-9b49-f977-a19276bc1202
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDC2E:3E4205:34930EA:463C14A:6B0207C9
html-safe-noncead15f02ebf38663e987b53e3ff1c2de551e3ce05af368378855d7a39b7393468
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzJFOjNFNDIwNTozNDkzMEVBOjQ2M0MxNEE6NkIwMjA3QzkiLCJ2aXNpdG9yX2lkIjoiNjE2NDU2NjUzNDk1MjA3ODgxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac7c2c77c530b611aa03d5331bfea047ce28db9d38bef5125dca211291ef30235e
hovercard-subject-tagpull_request:4488036837
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/python/cpython/pull/157228/files
twitter:imagehttps://avatars.githubusercontent.com/u/5383?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/5383?s=400&v=4
og:image:altSee #157227 for more details Basically, BinaryWriter.write_sample() only checks whether stack_frames is a list, and does PyList_GET_ITEM() / PyStructSequence_GET_ITEM() all the way. The PR adds a c...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
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
release423dbb54c5e7bfecc838eb387c1435eb3d0e760d
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/157228/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F157228%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%2Fpython%2Fcpython%2Fpull%2F157228%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=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/157228/files
Reloadhttps://github.com/python/cpython/pull/157228/files
Reloadhttps://github.com/python/cpython/pull/157228/files
pythonhttps://github.com/python
cpythonhttps://github.com/python/cpython
Codehttps://github.com/python/cpython
Issues5k+ (5k+)https://github.com/python/cpython/issues
Pull requests2.4k (2.4k)https://github.com/python/cpython/pulls
Actionshttps://github.com/python/cpython/actions
Projectshttps://github.com/python/cpython/projects
Security and qualityhttps://github.com/python/cpython/security
Insightshttps://github.com/python/cpython/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
maurycyhttps://github.com/maurycy
python:mainhttps://github.com/python/cpython/tree/main
maurycy:fix-remote-debugging-writer-validationhttps://github.com/maurycy/cpython/tree/fix-remote-debugging-writer-validation
Conversation 15 https://github.com/python/cpython/pull/157228
Commits 9 https://github.com/python/cpython/pull/157228/commits
Checks 57 https://github.com/python/cpython/pull/157228/checks
Files changed 3 https://github.com/python/cpython/pull/157228/files
gh-157227: _remote_debugging: Validate lists and tuples in write_sample https://github.com/python/cpython/pull/157228/files#top
Show all changes 9 commits https://github.com/python/cpython/pull/157228/files
aec95c2 CHECK_TUPLE_ITEMS, CHECK_LIST macros maurycy Sep 9, 2026 https://github.com/python/cpython/pull/157228/commits/aec95c217260ec8d67ad16c1180ee52cc5a749d8
9a75080 test maurycy Sep 9, 2026 https://github.com/python/cpython/pull/157228/commits/9a75080fe278fcbab2e36c483678a0253bf6bef5
0e4f214 Merge branch 'main' into fix-remote-debugging-writer-validation maurycy Oct 4, 2026 https://github.com/python/cpython/pull/157228/commits/0e4f2146ad1d963637ff1fcb01062c4a42055102
242cfb1 Merge branch 'main' into fix-remote-debugging-writer-validation maurycy Oct 5, 2026 https://github.com/python/cpython/pull/157228/commits/242cfb1a4c6da85e5f587826ffaa651e226e6b19
f449a15 Merge branch 'main' into fix-remote-debugging-writer-validation maurycy Oct 5, 2026 https://github.com/python/cpython/pull/157228/commits/f449a15c4d4a72431723cf28c591c41658fda019
a63e044 news maurycy Oct 12, 2026 https://github.com/python/cpython/pull/157228/commits/a63e0445a78c212e7d379c4d94a828e9616ef1fd
5e1e6a8 the issue is 157227 maurycy Nov 18, 2026 https://github.com/python/cpython/pull/157228/commits/5e1e6a8b4801d467a660fee63e5a9a28b1fa0bab
063c33f regression test maurycy Nov 18, 2026 https://github.com/python/cpython/pull/157228/commits/063c33f2b4de7bc0a50d4dfbcbac44475662f1d3
55468ba Merge branch 'main' into fix-remote-debugging-writer-validation maurycy Nov 19, 2026 https://github.com/python/cpython/pull/157228/commits/55468bad541953a73a594056c8a2297b52f0c087
Clear filters https://github.com/python/cpython/pull/157228/files
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
test_binary_format.py https://github.com/python/cpython/pull/157228/files#diff-bd4b914717c4ce7ddb2e29a91a71fdba550983ce9cea09b1ee06847b128d71b6
2026-10-13-00-19-19.gh-issue-157227.9vKigH.rst https://github.com/python/cpython/pull/157228/files#diff-dd0362aee153bd3d38dbc04dd6d25a5dc1c36e82a0c618ff62aee3cdacebe22b
binary_io_writer.c https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L568
Lib/test/test_profiling/test_sampling_profiler/test_binary_format.pyhttps://github.com/python/cpython/pull/157228/files#diff-bd4b914717c4ce7ddb2e29a91a71fdba550983ce9cea09b1ee06847b128d71b6
View file https://github.com/python/cpython/blob/55468bad541953a73a594056c8a2297b52f0c087/Lib/test/test_profiling/test_sampling_profiler/test_binary_format.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/157228/{{ revealButtonHref }}
https://github.com/python/cpython/pull/157228/files#diff-bd4b914717c4ce7ddb2e29a91a71fdba550983ce9cea09b1ee06847b128d71b6
pablogsalhttps://github.com/pablogsal
Oct 12, 2026https://github.com/python/cpython/pull/157228/files#r4250051389
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
https://github.com/python/cpython/pull/157228/files#diff-bd4b914717c4ce7ddb2e29a91a71fdba550983ce9cea09b1ee06847b128d71b6
Misc/NEWS.d/next/Library/2026-10-13-00-19-19.gh-issue-157227.9vKigH.rsthttps://github.com/python/cpython/pull/157228/files#diff-dd0362aee153bd3d38dbc04dd6d25a5dc1c36e82a0c618ff62aee3cdacebe22b
View file https://github.com/python/cpython/blob/55468bad541953a73a594056c8a2297b52f0c087/Misc/NEWS.d/next/Library/2026-10-13-00-19-19.gh-issue-157227.9vKigH.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/157228/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L336
Modules/_remote_debugging/binary_io_writer.chttps://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
View file https://github.com/python/cpython/blob/55468bad541953a73a594056c8a2297b52f0c087/Modules/_remote_debugging/binary_io_writer.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/157228/{{ revealButtonHref }}
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
maurycyhttps://github.com/maurycy
Sep 9, 2026https://github.com/python/cpython/pull/157228/files#r3971669669
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
cpython/Objects/memoryobject.chttps://github.com/python/cpython/blob/9a75080fe278fcbab2e36c483678a0253bf6bef5/Objects/memoryobject.c#L217-L222
9a75080https://github.com/python/cpython/commit/9a75080fe278fcbab2e36c483678a0253bf6bef5
cpython/Modules/_testbuffer.chttps://github.com/python/cpython/blob/9a75080fe278fcbab2e36c483678a0253bf6bef5/Modules/_testbuffer.c#L26-L33
9a75080https://github.com/python/cpython/commit/9a75080fe278fcbab2e36c483678a0253bf6bef5
cpython/Modules/_io/stringio.chttps://github.com/python/cpython/blob/9a75080fe278fcbab2e36c483678a0253bf6bef5/Modules/_io/stringio.c#L922-L930
9a75080https://github.com/python/cpython/commit/9a75080fe278fcbab2e36c483678a0253bf6bef5
cpython/Python/_warnings.chttps://github.com/python/cpython/blob/9a75080fe278fcbab2e36c483678a0253bf6bef5/Python/_warnings.c#L450-L465
9a75080https://github.com/python/cpython/commit/9a75080fe278fcbab2e36c483678a0253bf6bef5
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
pablogsalhttps://github.com/pablogsal
Sep 11, 2026https://github.com/python/cpython/pull/157228/files#r3991241383
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
maurycyhttps://github.com/maurycy
Oct 4, 2026https://github.com/python/cpython/pull/157228/files#r4179075045
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@pablogsalhttps://github.com/pablogsal
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
pablogsalhttps://github.com/pablogsal
Oct 12, 2026https://github.com/python/cpython/pull/157228/files#r4250051677
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
pablogsalhttps://github.com/pablogsal
Oct 12, 2026https://github.com/python/cpython/pull/157228/files#r4250051407
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
pablogsalhttps://github.com/pablogsal
Nov 19, 2026https://github.com/python/cpython/pull/157228/files#r4633379400
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
pablogsalhttps://github.com/pablogsal
Sep 11, 2026https://github.com/python/cpython/pull/157228/files#r3991241354
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
pablogsalhttps://github.com/pablogsal
Sep 11, 2026https://github.com/python/cpython/pull/157228/files#r3991241371
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
pablogsalhttps://github.com/pablogsal
Oct 12, 2026https://github.com/python/cpython/pull/157228/files#r4250051385
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
gh-157227https://github.com/python/cpython/issues/157227
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
pablogsalhttps://github.com/pablogsal
Oct 12, 2026https://github.com/python/cpython/pull/157228/files#r4250051393
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
pablogsalhttps://github.com/pablogsal
Nov 19, 2026https://github.com/python/cpython/pull/157228/files#r4633379384
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/157228/files
https://github.com/python/cpython/pull/157228/files#diff-0874163bd266558e3cba125b8511bf1614fcd01c94e99fc14d81daac38390847
Please reload this pagehttps://github.com/python/cpython/pull/157228/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

Viewport: width=device-width


URLs of crawlers that visited me.