Open
Description
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
-
parseall(Expr, "@(")
(Fix crash with empty macro name when parsing"@("
#382) -
parseall(SyntaxNode, "function(where")
(Fix crash when parsing malformedfunction(where
#388) -
parseall(SyntaxNode, "x{primitive\ntype")
,parseall(SyntaxNode, "(primitive\ntype")
(Disallow newline between contextual keyword pairs in parentheses #386) -
parseall(SyntaxNode, "var\"\"``\$")
,parseall(SyntaxNode, "+||where'``\$")
(Fix crashes due to lexing ambiguity of string delimiters #394)
Tree building errors
-
parseall(SyntaxNode, "using . ...", ignore_errors=true)
-
parseall(Expr, "\x04'\0", ignore_errors=true)
-
parseall(Expr, "@(var\"", ignore_errors=true)
-
parseall(Expr, "for\n\n<:", ignore_errors=true)
(Fix bug parsing unary subtypes with newlines #393) -
parseall(Expr, "x:y:<", ignore_errors=true)
Hook errors
-
Meta_parseall("x.")
(Fix error in hooks when parsing incompletex.
#385)