JuliaLang / JuliaLang/JuliaSyntax.jl

Failures found using fuzz testing

Open
#380 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Julia
Stars
293
Forks
50
PR merge metrics
No merged PRs in 30d

Description

Using the tools from #379 uncovers several bugs. For example

```julia
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)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the fuzzing tools from #379 and reproduce the unchecked parser and tree-building cases listed here, including the `parseall` calls using `ignore_errors=true`. Compare them with the checked-off cases and inspect the related issues such as #382, #386, #388, #393, #394, and #385. Done means the remaining failures are resolved and covered by appropriate regression checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.