Skip to content

Panic when parsing fuzzed code #1768

Closed
Closed
@5225225

Description

@5225225

Describe the bug

The code should not panic.

To Reproduce

fn main() {
    let data = b"\n(\nx\n)\n";
    drop(boa::parse(data, true));
}

Expected behavior

It shouldn't panic, and it should parse correctly (as whatever it's meant to parse as, not sure.)

Build environment:

  • OS: Arch Linux
  • Target triple: x86_64-unknown-linux-gnu (I think, couldn't find how to print it and I don't think it's terribly important here)
  • Rustc version: rustc 1.59.0-nightly (cfa3fe5af 2021-12-31)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinglexerIssues surrounding the lexer

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions