JuliaSyntax.jl
JuliaSyntax.jl copied to clipboard
Failures found using fuzz testing
Using the tools from #379 uncovers several bugs. For example
fuzz_test(try_parseall_failure, product_token_fuzz(cutdown_tokens, 2))
fuzz_test(try_hook_failure, product_token_fuzz(cutdown_tokens, 2))
fuzz_test(try_parseall_failure, random_token_fuzz(cutdown_tokens, 10, 10_000_000))
Some errors found with this:
Parser errors
- [x]
parseall(Expr, "@(")(#382) - [x]
parseall(SyntaxNode, "function(where")(#388) - [x]
parseall(SyntaxNode, "x{primitive\ntype"),parseall(SyntaxNode, "(primitive\ntype")(#386) - [x]
parseall(SyntaxNode, "var\"\"``\$"),parseall(SyntaxNode, "+||where'``\$")(#394)
Tree building errors
- [ ]
parseall(SyntaxNode, "using . ...", ignore_errors=true) - [ ]
parseall(Expr, "\x04'\0", ignore_errors=true) - [ ]
parseall(Expr, "@(var\"", ignore_errors=true) - [x]
parseall(Expr, "for\n\n<:", ignore_errors=true)(#393) - [ ]
parseall(Expr, "x:y:<", ignore_errors=true)
Hook errors
- [x]
Meta_parseall("x.")(#385)