René's URL Explorer Experiment


Title: gh-150449: Fix sqlite3.Blob crash with negative-step slices by ever0de · Pull Request #150450 · python/cpython · GitHub

Open Graph Title: gh-150449: Fix sqlite3.Blob crash with negative-step slices by ever0de · Pull Request #150450 · python/cpython

X Title: gh-150449: Fix sqlite3.Blob crash with negative-step slices by ever0de · Pull Request #150450 · python/cpython

Description: Reading or writing a sqlite3.Blob with a negative-step slice such as blob[9:0:-2] caused a crash (SystemError on older versions, ValueError on current main) because the C code computed stop - start as the read length, which is negative for negative steps. Fix subscript_slice() and ass_subscript_slice() in Modules/_sqlite/blob.c to handle both positive and negative steps correctly: For step > 1: keep reading [start, stop) and indexing forward as before. For step < -1: read the contiguous range [start+(len-1)*step, start] and index backward with stride -step. Issue: gh-150449

Open Graph Description: Reading or writing a sqlite3.Blob with a negative-step slice such as blob[9:0:-2] caused a crash (SystemError on older versions, ValueError on current main) because the C code computed stop - start...

X Description: Reading or writing a sqlite3.Blob with a negative-step slice such as blob[9:0:-2] caused a crash (SystemError on older versions, ValueError on current main) because the C code computed stop - start...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:efcd82df-4bd4-4c4a-a335-bf3ce7843fee
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9E12:16BA45:4E12:61C6:6A50EC23
html-safe-nonce4698615b4bb39394c4dce21831a0be20c4200b90da166abcddc1e908f1f24bec
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RTEyOjE2QkE0NTo0RTEyOjYxQzY6NkE1MEVDMjMiLCJ2aXNpdG9yX2lkIjoiMjMyMzg1MTY2Mjg0MDYyMjExNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac96fc128e8a5ab6695c115687ec3c4bfb56cfafc3fc3d3d7fa88e2d8cc362bb82
hovercard-subject-tagpull_request:3745949651
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/150450/files
twitter:imagehttps://avatars.githubusercontent.com/u/27040963?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/27040963?s=400&v=4
og:image:altReading or writing a sqlite3.Blob with a negative-step slice such as blob[9:0:-2] caused a crash (SystemError on older versions, ValueError on current main) because the C code computed stop - start...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None72b13e0e8d0319acdd27a145cfe73f4f06c791713d0ac4690e41fb68ad28cac0
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
releasefb19d617b534959801b4b7453938ecf1dfa22131
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/150450/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F150450%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F150450%2Ffiles
Sign up https://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/150450/files
Reloadhttps://github.com/python/cpython/pull/150450/files
Reloadhttps://github.com/python/cpython/pull/150450/files
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
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
ever0dehttps://github.com/ever0de
python:mainhttps://github.com/python/cpython/tree/main
ever0de:gh-150449-fix-sqlite-blob-negative-step-slicehttps://github.com/ever0de/cpython/tree/gh-150449-fix-sqlite-blob-negative-step-slice
Conversation 27 https://github.com/python/cpython/pull/150450
Commits 17 https://github.com/python/cpython/pull/150450/commits
Checks 51 https://github.com/python/cpython/pull/150450/checks
Files changed https://github.com/python/cpython/pull/150450/files
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
gh-150449: Fix sqlite3.Blob crash with negative-step slices https://github.com/python/cpython/pull/150450/files#top
Show all changes 17 commits https://github.com/python/cpython/pull/150450/files
af0eb65 gh-150449: Fix sqlite3.Blob crash with negative-step slices ever0de May 26, 2026 https://github.com/python/cpython/pull/150450/commits/af0eb656e77f13b542e8956f1dec987857ff082e
85312b4 gh-150449: validate slice assignment size even for empty slices ever0de May 26, 2026 https://github.com/python/cpython/pull/150450/commits/85312b4ed5ece748468f79875bd1dc926f6c62e1
c0c2018 gh-150449: add tests for negative-step slices with start <= stop ever0de May 26, 2026 https://github.com/python/cpython/pull/150450/commits/c0c20185e8cff47684ce18597e50b9c759896a28
83d3a3c Fix PEP 7 line-length violations in blob.c (ass_subscript_slice) ever0de May 26, 2026 https://github.com/python/cpython/pull/150450/commits/83d3a3c295cd60a8847c45687d1bd2612ca12eed
f7c9f53 gh-150449: Address review: docs, tests, and rename write_offset ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/f7c9f53f26e9d96b974c353114696ddfc5a34606
5087b42 gh-150449: Fix versionchanged version: use 'next' not '3.16' ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/5087b422665452ca1c70ae2aaf66766d8d1aaaed
d774ab7 gh-150449: Fix wording in NEWS and whatsnew: 'crash' → 'raise SystemE… ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/d774ab7d66e6a1ccfb846346c1c3859ca2949301
5bf02de gh-150449: Remove redundant issue references from test comments ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/5bf02de6365b15fc222773228b62d63d342029d1
c311c8e Merge remote-tracking branch 'upstream/main' into gh-150449-fix-sqlit… ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/c311c8e483161c53304346e38e207307d04ff0b3
d4b4b43 gh-150449: Fix missing blank line after xml section in whatsnew ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/d4b4b43fb625a57437c8315aff0071acac6ab033
0936d6b gh-150449: Rename read_length to write_length in ass_subscript_slice ever0de May 30, 2026 https://github.com/python/cpython/pull/150450/commits/0936d6b02038a0712412d743d7a40fc4c83ecdb4
5f2f916 gh-150449: Move empty-slice validation fix to dedicated PR for gh-150913 ever0de Jun 4, 2026 https://github.com/python/cpython/pull/150450/commits/5f2f91625c3da69dbd67bd8733b61f2800daa5e1
d47abf8 Merge remote-tracking branch 'upstream/main' into gh-150449-fix-sqlit… ever0de Jun 4, 2026 https://github.com/python/cpython/pull/150450/commits/d47abf89f56d74e8815a181fcc21f075acc4a31e
be1aa18 gh-150449: Add tests for extreme step values in sqlite3.Blob slice op… ever0de Jun 5, 2026 https://github.com/python/cpython/pull/150450/commits/be1aa18c77e38d820e9d69bea4cb257677e3e976
f76ebf7 gh-150449: Assert correctness of extreme-step slice assignment in sql… ever0de Jun 5, 2026 https://github.com/python/cpython/pull/150450/commits/f76ebf77d037d7d906c7161bda05d88f774ae501
52084f9 gh-150449: Isolate extreme-step Blob assignment tests ever0de Jun 5, 2026 https://github.com/python/cpython/pull/150450/commits/52084f9e07249bf99e907dc971c9c4503f5b6ef8
a462e70 Merge branch 'main' into gh-150449-fix-sqlite-blob-negative-step-slice serhiy-storchaka Jun 8, 2026 https://github.com/python/cpython/pull/150450/commits/a462e70375053af9f86192a31928cf23a19e4b69
Clear filters https://github.com/python/cpython/pull/150450/files
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
sqlite3.rst https://github.com/python/cpython/pull/150450/files#diff-e9385684db2b0ebe16c55670829d121faab7f91b9bd0f30767d4b399f696471f
3.16.rst https://github.com/python/cpython/pull/150450/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
test_dbapi.py https://github.com/python/cpython/pull/150450/files#diff-8e2e6a9df72f1a10e817fcf22c760aebeabd549d12d1f6d4a921085462288e4b
2026-05-26-15-53-50.gh-issue-150449.GfDWxl.rst https://github.com/python/cpython/pull/150450/files#diff-dddc4591cbdf20185b880e92c83090d06d3537983f6742e18469bec908ea43c6
blob.c https://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L589
Doc/library/sqlite3.rsthttps://github.com/python/cpython/pull/150450/files#diff-e9385684db2b0ebe16c55670829d121faab7f91b9bd0f30767d4b399f696471f
View file https://github.com/python/cpython/blob/a462e70375053af9f86192a31928cf23a19e4b69/Doc/library/sqlite3.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/150450/{{ revealButtonHref }}
https://github.com/python/cpython/pull/150450/files#diff-e9385684db2b0ebe16c55670829d121faab7f91b9bd0f30767d4b399f696471f
https://github.com/python/cpython/pull/150450/files#diff-e9385684db2b0ebe16c55670829d121faab7f91b9bd0f30767d4b399f696471f
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L116
Doc/whatsnew/3.16.rsthttps://github.com/python/cpython/pull/150450/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
View file https://github.com/python/cpython/blob/a462e70375053af9f86192a31928cf23a19e4b69/Doc/whatsnew/3.16.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/150450/{{ revealButtonHref }}
https://github.com/python/cpython/pull/150450/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
https://github.com/python/cpython/pull/150450/files#diff-e69e0be717f3409832d520e20348f62af39c9436ba1a9d82e842bc10e5eb51d7
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L591
Lib/test/test_sqlite3/test_dbapi.pyhttps://github.com/python/cpython/pull/150450/files#diff-8e2e6a9df72f1a10e817fcf22c760aebeabd549d12d1f6d4a921085462288e4b
View file https://github.com/python/cpython/blob/a462e70375053af9f86192a31928cf23a19e4b69/Lib/test/test_sqlite3/test_dbapi.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/150450/{{ revealButtonHref }}
https://github.com/python/cpython/pull/150450/files#diff-8e2e6a9df72f1a10e817fcf22c760aebeabd549d12d1f6d4a921085462288e4b
https://github.com/python/cpython/pull/150450/files#diff-8e2e6a9df72f1a10e817fcf22c760aebeabd549d12d1f6d4a921085462288e4b
https://github.com/python/cpython/pull/150450/files#diff-8e2e6a9df72f1a10e817fcf22c760aebeabd549d12d1f6d4a921085462288e4b
https://github.com/python/cpython/pull/150450/files#diff-8e2e6a9df72f1a10e817fcf22c760aebeabd549d12d1f6d4a921085462288e4b
Misc/NEWS.d/next/Library/2026-05-26-15-53-50.gh-issue-150449.GfDWxl.rsthttps://github.com/python/cpython/pull/150450/files#diff-dddc4591cbdf20185b880e92c83090d06d3537983f6742e18469bec908ea43c6
View file https://github.com/python/cpython/blob/a462e70375053af9f86192a31928cf23a19e4b69/Misc/NEWS.d/next/Library/2026-05-26-15-53-50.gh-issue-150449.GfDWxl.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/150450/{{ revealButtonHref }}
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L592
Modules/_sqlite/blob.chttps://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
View file https://github.com/python/cpython/blob/a462e70375053af9f86192a31928cf23a19e4b69/Modules/_sqlite/blob.c
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/150450/{{ revealButtonHref }}
https://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
https://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
picnixzhttps://github.com/picnixz
Jun 4, 2026https://github.com/python/cpython/pull/150450/files#r3358951881
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Jun 4, 2026https://github.com/python/cpython/pull/150450/files#r3359148816
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
picnixzhttps://github.com/picnixz
Jun 4, 2026https://github.com/python/cpython/pull/150450/files#r3359385726
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
ever0dehttps://github.com/ever0de
Jun 5, 2026https://github.com/python/cpython/pull/150450/files#r3360049513
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
serhiy-storchakahttps://github.com/serhiy-storchaka
Jun 5, 2026https://github.com/python/cpython/pull/150450/files#r3361212545
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
https://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
https://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
Please reload this pagehttps://github.com/python/cpython/pull/150450/files
https://github.com/python/cpython/pull/150450/files#diff-a846b6359be230fce8c4315f85073655bb9b96b1cb4da7c0712b560d93a3fb37
Please reload this pagehttps://github.com/python/cpython/pull/150450/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.