Skip to content

feat(fuzz): add awk_fuzz target for awk builtin#1112

Merged
chaliy merged 1 commit intomainfrom
feat/issue-1095-awk-fuzz
Apr 6, 2026
Merged

feat(fuzz): add awk_fuzz target for awk builtin#1112
chaliy merged 1 commit intomainfrom
feat/issue-1095-awk-fuzz

Conversation

@chaliy
Copy link
Copy Markdown
Contributor

@chaliy chaliy commented Apr 6, 2026

Summary

  • Add fuzz target for the awk builtin which implements a full AWK interpreter with pattern matching, expressions, functions, and field separation
  • Target splits fuzz input into AWK program (first line) and input data (remainder)
  • Exercises both default and colon field separator modes
  • Includes depth-limiting filter to reject deeply nested expressions

Changes

  • New fuzz/fuzz_targets/awk_fuzz.rs: fuzz target
  • Updated fuzz/Cargo.toml: added [[bin]] entry for awk_fuzz
  • New tests/awk_fuzz_scaffold_tests.rs: 5 scaffold tests (valid program, invalid syntax, BEGIN/END, regex, field separator)

Test plan

  • cargo test --test awk_fuzz_scaffold_tests — 5 tests pass
  • cargo clippy --all-targets --all-features -- -D warnings — clean
  • cargo fmt --check — clean

Closes #1095

Add fuzz target for the awk builtin which implements a full AWK
interpreter with pattern matching, expressions, functions, and field
separation — many code paths to explore.

The target splits fuzz input into an AWK program (first line) and input
data (remainder), then exercises the awk builtin with both default and
colon field separators through the full interpreter with tight resource
limits.

Includes scaffold tests validating the awk builtin handles valid
programs, invalid syntax, BEGIN/END blocks, malformed regex, and
field separators without panicking.

Closes #1095
@chaliy chaliy force-pushed the feat/issue-1095-awk-fuzz branch from 91f1582 to 2418176 Compare April 6, 2026 10:46
@chaliy chaliy merged commit 69c73ef into main Apr 6, 2026
18 checks passed
@chaliy chaliy deleted the feat/issue-1095-awk-fuzz branch April 6, 2026 10:54
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.

fuzz: add awk_fuzz target

1 participant