GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-142787: Fix assertion failure in sqlite3 blob slice by abdoulrasheed · Pull Request #142824 · python/cpython

Conversation

@abdoulrasheed

@abdoulrasheed abdoulrasheed commented Dec 16, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fix assertion failure when slicing a sqlite3.Blob with indices that result in an empty slice.

  • Issue: assertion failure at Modules/_sqlite/blob.c:146: PyObject *read_multiple(pysqlite_Blob *, Py_ssize_t, Py_ssize_t): Assertion 'offset < sqlite3_blob_bytes(self->blob)' failed #142787

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@abdoulrasheed
pythongh-142787: Fix assertion failure in sqlite3 blob slice
97ca005
@abdoulrasheed
abdoulrasheed requested review from berkerpeksag and erlend-aasland as code owners December 16, 2025 13:29
@bedevere-app bedevere-app Bot mentioned this pull request Dec 16, 2025
assertion failure at Modules/_sqlite/blob.c:146: PyObject *read_multiple(pysqlite_Blob *, Py_ssize_t, Py_ssize_t): Assertion 'offset < sqlite3_blob_bytes(self->blob)' failed #142787
Closed
@bedevere-app bedevere-app Bot added the awaiting review label Dec 16, 2025
@erlend-aasland

erlend-aasland commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Thanks for working on this! Please make sure this regression is covered by the test suite.

abdoulrasheed reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland erlend-aasland added needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Dec 16, 2025
@erlend-aasland erlend-aasland self-assigned this Dec 16, 2025
@aisk

aisk commented Dec 16, 2025

Copy link
Copy Markdown
Member

Hi, there is a duplicated news entry, please remove it.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@blurb-it @abdoulrasheed
📜🤖 Added by blurb_it.
577803c
@abdoulrasheed
abdoulrasheed force-pushed the fix-issue-142787 branch from 8c9bd46 to 577803c Compare December 16, 2025 13:39
@erlend-aasland

erlend-aasland commented Dec 16, 2025

Copy link
Copy Markdown
Contributor

Moreover, please avoid force-pushing (as recommended by the devguide).

abdoulrasheed reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@abdoulrasheed

abdoulrasheed commented Dec 16, 2025

Copy link
Copy Markdown
Contributor Author

Moreover, please avoid force-pushing (as recommended by the devguide).

Noted @erlend-aasland

erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@abdoulrasheed
Add regression test for pythongh-142787
c7a12b3
erlend-aasland
erlend-aasland reviewed Dec 16, 2025
View reviewed changes
Comment thread Lib/test/test_sqlite3/test_dbapi.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@abdoulrasheed
Update test: insert new row instead of deleting
e1556e8
aisk
aisk approved these changes Dec 17, 2025
View reviewed changes
@bedevere-app bedevere-app Bot added awaiting core review and removed awaiting review labels Dec 17, 2025
@abdoulrasheed

abdoulrasheed commented Jan 8, 2026

Copy link
Copy Markdown
Contributor Author

@aisk Gentle reminder on this

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aisk

aisk commented Jan 8, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

Let's wait for @erlend-aasland's review.

erlend-aasland reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

serhiy-storchaka
serhiy-storchaka approved these changes Jan 9, 2026
View reviewed changes

@serhiy-storchaka serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-app bedevere-app Bot added awaiting merge and removed awaiting core review labels Jan 9, 2026
erlend-aasland
erlend-aasland approved these changes Feb 26, 2026
View reviewed changes
@erlend-aasland
Merge branch 'main' into fix-issue-142787
57fdbfe
@erlend-aasland
erlend-aasland enabled auto-merge (squash) February 26, 2026 23:19
@erlend-aasland erlend-aasland linked an issue Feb 26, 2026 that may be closed by this pull request
assertion failure at Modules/_sqlite/blob.c:146: PyObject *read_multiple(pysqlite_Blob *, Py_ssize_t, Py_ssize_t): Assertion 'offset < sqlite3_blob_bytes(self->blob)' failed #142787
Closed
@erlend-aasland
erlend-aasland merged commit 06b0920 into python:main Feb 26, 2026
47 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the awaiting merge label Feb 26, 2026
@miss-islington-app

miss-islington-app Bot commented Feb 26, 2026

Copy link
Copy Markdown

Thanks @abdoulrasheed for the PR, and @erlend-aasland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 26, 2026
@abdoulrasheed @miss-islington
pythongh-142787: Handle empty sqlite3 blob slices (pythonGH-142824)
04cab0e
(cherry picked from commit 06b0920)

Co-authored-by: A.Ibrahim <[email protected]>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Feb 26, 2026
@abdoulrasheed @miss-islington
pythongh-142787: Handle empty sqlite3 blob slices (pythonGH-142824)
de537f0
(cherry picked from commit 06b0920)

Co-authored-by: A.Ibrahim <[email protected]>
@bedevere-app

bedevere-app Bot commented Feb 26, 2026

Copy link
Copy Markdown

GH-145297 is a backport of this pull request to the 3.14 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Feb 26, 2026
@bedevere-app

bedevere-app Bot commented Feb 26, 2026

Copy link
Copy Markdown

GH-145298 is a backport of this pull request to the 3.13 branch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 only security fixes label Feb 26, 2026
erlend-aasland pushed a commit that referenced this pull request Feb 27, 2026
@miss-islington @abdoulrasheed
[3.14] gh-142787: Handle empty sqlite3 blob slices (GH-142824) (#145297)
bc6a7a2
(cherry picked from commit 06b0920)

Co-authored-by: A.Ibrahim <[email protected]>
erlend-aasland pushed a commit that referenced this pull request Feb 27, 2026
@miss-islington @abdoulrasheed
[3.13] gh-142787: Handle empty sqlite3 blob slices (GH-142824) (#145298)
cd3e9b3
(cherry picked from commit 06b0920)

Co-authored-by: A.Ibrahim <[email protected]>
brijkapadia pushed a commit to brijkapadia/cpython that referenced this pull request Feb 28, 2026
@abdoulrasheed @brijkapadia
pythongh-142787: Handle empty sqlite3 blob slices (python#142824)
26a469c
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
@abdoulrasheed @ljfp
pythongh-142787: Handle empty sqlite3 blob slices (python#142824)
9fbeae8
@ever0de ever0de mentioned this pull request May 26, 2026
sqlite3: Blob crashes when using a negative-step slice #150449
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@aisk aisk aisk approved these changes
@serhiy-storchaka serhiy-storchaka serhiy-storchaka approved these changes
@erlend-aasland erlend-aasland erlend-aasland approved these changes
@berkerpeksag berkerpeksag Awaiting requested review from berkerpeksag

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@erlend-aasland erlend-aasland

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

assertion failure at Modules/_sqlite/blob.c:146: PyObject *read_multiple(pysqlite_Blob *, Py_ssize_t, Py_ssize_t): Assertion 'offset < sqlite3_blob_bytes(self->blob)' failed

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@abdoulrasheed @erlend-aasland @aisk @serhiy-storchaka
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.