Skip to content

SQLite: keep recursive tests within WebAssembly stack limits#780

Closed
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-cfo/kd-c5i.7-fix-mmap-randexpr1-expression-depth-failures-under-kande
Closed

SQLite: keep recursive tests within WebAssembly stack limits#780
brandonpayton wants to merge 1 commit into
mainfrom
gascity/kd-cfo/kd-c5i.7-fix-mmap-randexpr1-expression-depth-failures-under-kande

Conversation

@brandonpayton

@brandonpayton brandonpayton commented Jun 27, 2026

Copy link
Copy Markdown
Member

What this does

#907 already landed the mmap/munmap fixes and the related Vitest regression coverage. This PR does not replay any of that work.

The remaining SQLite work is narrower:

  • build the shipped SQLite library and the official testfixture with the same WebAssembly-safe compound-select, expression, and JSON depth limits;
  • give testfixture a 1 MiB shadow stack;
  • make four upstream test patches read the compiled limits and omit only cases that actually exceed them;
  • keep the passing assertions around those omitted operations running on both hosts.

What was removed

This reconstruction is directly on current main, without #769 or #889 ancestry. It deliberately drops the mmap/runtime work already in #907, the blanket no_mutex_try skips, the old 2 GiB maximum-memory workaround, and the broad SQLite result-harvesting changes that belong in the later harness PR. Two misc5 cases and four misc1 assertions that pass at the configured limit are kept instead of being hidden as omissions.

ABI and package artifacts

There is no kernel/host ABI change; ABI 39 and the committed snapshot stay unchanged. The shipped SQLite bytes do change because its compile-time limits change, so build.toml moves from revision 2 to revision 3. The locally built testfixture also changes. No other package revision is touched.

Validation run

All commands were run through scripts/dev-shell.sh.

  • built worktree-local zlib, Tcl, the shipped SQLite package, and the fork-instrumented testfixture;
  • confirmed the four patches apply cleanly to pristine SQLite 3.49.1 sources;
  • Node focused runs: misc5 37 pass / 2 documented omissions, misc1 88 pass / 6 omissions, json101 278 pass, and randexpr1 2,578 pass / 23 omissions;
  • Chromium focused runs with a freshly rebuilt SQLite VFS image produced the same pass/omission results;
  • confirmed the fixture reports MAX_COMPOUND_SELECT=50, MAX_EXPR_DEPTH=100, JSON_MAX_DEPTH=100, and COLUMN_METADATA=1;
  • git diff --check, shell syntax checks, and the ABI snapshot/version check passed.

The full official SQLite permutation was attempted, but current main's harness could not launch its generated sh jobs, so it did not provide a valid full-suite result. That harness work is being kept in the focused #783 follow-up. Full libc, POSIX, Sortix, Firefox, and WebKit suites were not run for this package-only slice. Performance was not measured and this PR makes no performance claim.

@github-actions

github-actions Bot commented Jun 27, 2026

Copy link
Copy Markdown

Phase B-1 matrix build status — pr-780-staging

ABI v39. 5 built, 0 failed, 5 total.

Package Arch Status Sha
sqlite wasm32 built 23cc95a3
sqlite wasm64 built a28e2b8d
php wasm32 built 746a8d1d
lamp wasm32 built 44a36f42
wordpress wasm32 built a131224a

Auto-generated; replaced on each push. Raw data in the publish-status workflow artifact.

@brandonpayton

Copy link
Copy Markdown
Member Author

Recording the current head before reconstruction: 3828f3636f142b27feceda653dbb426015462185. I’m rebuilding this directly on current main, keeping only the WebAssembly recursion-limit work and removing the stale #769 ancestry. The branch will be updated with --force-with-lease.

@brandonpayton brandonpayton changed the title sqlite: omit randexpr depth cases at wasm limit SQLite: keep recursive tests within WebAssembly stack limits Jul 13, 2026
@brandonpayton brandonpayton force-pushed the gascity/kd-cfo/kd-c5i.7-fix-mmap-randexpr1-expression-depth-failures-under-kande branch from 3828f36 to 4b04ff3 Compare July 13, 2026 19:11
@brandonpayton brandonpayton changed the base branch from gascity/kd-cfo/kd-cfo.4-debug-wave34-browser-memsubsys-readonly-sqlite-failures to main July 13, 2026 19:11
@brandonpayton

Copy link
Copy Markdown
Member Author

Closing this focused source PR because its unique SQLite WebAssembly recursion-limit work is now carried by #934 at exact green head 260d75d5adc31b327f5591229dbfbb287d395fd6. #934 keeps it as a separate purpose commit and passed the full staging and browser gates. This is not a claim that this branch was merged verbatim.

@brandonpayton brandonpayton deleted the gascity/kd-cfo/kd-c5i.7-fix-mmap-randexpr1-expression-depth-failures-under-kande branch July 14, 2026 02:42
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