🧪 Fuzz parser totality against hostile input
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 86/100
Research direction
Read engine/parser.go:31-54 and the existing cases in engine/parser_test.go:24-230, then run the specified seed-corpus command. Add engine/parser_fuzz_test.go with FuzzParser using a fresh zero VM and parser, the six listed seeds, and an 8 KiB bound. Verify that the seed and 30-second fuzz commands complete without a panic.
Written by the indexing model from the issue text.
Description
Summary
NewParser accepts arbitrary rune input through io.RuneReader in engine/parser.go:31-54, while engine/parser_test.go:24-230 provides a finite table corpus. The parser must return a term or error for hostile input without panicking.
Why it matters
Parser panics turn malformed source into a host failure rather than a Prolog parse error and can expose untested lexer-parser state transitions.
Scope
Add engine/parser_fuzz_test.go with FuzzParser. Use a fresh zero VM and parser for each input, bound inputs to 8 KiB, and seed "", "foo.", "[", "'don''t panic'.", "9223372036854775808.", and "tag{x:}.".
Acceptance criteria
-
FuzzParsercreates a fresh zero VM and parser for every fuzz input. - Inputs longer than 8 KiB are skipped or otherwise bounded before parsing.
- The seed corpus contains all six specified inputs.
- Every seed and fuzz input returns a term or error without panicking.
- A 30-second fuzz run completes without a panic.
Verification
Run the seed corpus through go test ./engine -run '^FuzzParser$' and run go test ./engine -run '^$' -fuzz '^FuzzParser$' -fuzztime=30s; both commands must complete without a panic.
- Dominant language
- Go
- Stars
- 5
- Forks
- 0
- Avg merge
- 6h 36m
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from axone-protocol/prolog
-
Difficulty 1/5 Under an hour Newbie friendliness 92/100
axone-protocol/prolog#87 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
axone-protocol/prolog#83 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
axone-protocol/prolog#88 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
axone-protocol/prolog#32 ·
-
axone-protocol/prolog#12 · 1 reaction · 1 assignee ·
All issues in axone-protocol/prolog
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·