Skip to content

fix: reject partial database pages as corruption - #14

Merged
MugdhoAI merged 5 commits into
mainfrom
fix/phase2-pager-file-integrity
Nov 3, 2026
Merged

MugdhoAI merged 5 commits into
mainfrom
fix/phase2-pager-file-integrity

Conversation

@MugdhoAI

@MugdhoAI MugdhoAI commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Reject database files whose length is not an exact multiple of the 4096-byte page size.
  • Add a dedicated pager corruption result for partial pages.
  • Propagate this condition through table_open as SQLITE_CORRUPT.
  • Add pager and database regression tests for truncated and oversized partial-page files.

Validation

  • Local validation has not yet been run against this branch.
  • GitHub Actions is configured to run the full test suite, strict-warning build, benchmark smoke test, and ASan/UBSan tests on pull requests.

Scope

This change does not alter the on-disk format for valid databases. It rejects malformed files that previously reached a short-read path and were reported as generic I/O failures.

@MugdhoAI
MugdhoAI marked this pull request as ready for review November 3, 2026 21:11
@MugdhoAI
MugdhoAI merged commit 16a63db into main Nov 3, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant