Skip to content

Fuzz complete SQL file compilation across database dialects - #1557

Open
lovasoa wants to merge 2 commits into
mainfrom
fuzz/oss-enrollment
Open

lovasoa wants to merge 2 commits into
mainfrom
fuzz/oss-enrollment

Conversation

@lovasoa

@lovasoa lovasoa commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

SQLPage needs one broad, maintainable fuzz entry point for the parser and backend-specific rewrite pipeline. This adds a cargo-fuzz target that compiles complete SQLPage files without executing SQL.

The first input byte selects all eight supported database dialects and native/ODBC placeholder handling. The remaining UTF-8 payload reaches tokenization, parsing, statement and expression classification, projection partitioning, parameter binding, backend lowering, and diagnostics. Existing SQL regression fixtures provide the seed corpus.

CI runs a bounded, deterministic smoke test over every SQL fixture with all 16 selector values. It performs 4,096 ASan executions with a fixed seed and a 10-minute job limit. A cold GitHub-hosted run completed in 3m54s, below the existing roughly 9–12 minute Docker jobs, so it does not lengthen the workflow's critical path.

This builds on #1556, which exposes the connection-free compiler used by the harness and is now merged.

Validation:

  • npm test (85 script tests)
  • cargo fmt --all -- --check
  • cargo clippy --all-targets --all-features -- -D warnings
  • cargo test (244 unit tests and 87 integration tests)
  • native cargo-fuzz ASan build
  • bounded CI smoke test (4,096 executions, no crash)
  • OSS-Fuzz image build and check_build
  • OSS-Fuzz ASan run over 2,064 generated seeds (2,065 executions, no crash)
  • OSS Verify plain, UBSan, ASan, and ASan+UBSan builds reproduced byte-for-byte across two builds

@lovasoa
lovasoa force-pushed the refactor/connection-free-sql-parser branch from 3b8a254 to 3c66b8e Compare October 23, 2026 07:26
@lovasoa
lovasoa force-pushed the fuzz/oss-enrollment branch from add7264 to 7737b87 Compare October 23, 2026 07:26
@lovasoa
lovasoa changed the base branch from refactor/connection-free-sql-parser to main October 23, 2026 07:26
@lovasoa
lovasoa force-pushed the fuzz/oss-enrollment branch 4 times, most recently from 0ddbb08 to 10de7d7 Compare October 23, 2026 07:52
@lovasoa
lovasoa changed the base branch from main to refactor/connection-free-sql-parser October 23, 2026 07:58
@lovasoa
lovasoa changed the base branch from refactor/connection-free-sql-parser to main October 23, 2026 08:00
@lovasoa
lovasoa force-pushed the fuzz/oss-enrollment branch from 10de7d7 to dc095a1 Compare October 23, 2026 08:00
@sjawhar-agent sjawhar-agent Bot mentioned this pull request Oct 23, 2026
7 tasks done
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