Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

🐛 Crash at escaped extended ascii character within regex expression  #4689

Open
@MahnurA

Description

@MahnurA

Environment information

Cannot run rome rage, issue found by fuzzer.

**Additional Context**: 
Discovered by: Implement round-trip fuzzers for finding correctness bugs [#4559](https://github.com/rome/tools/pull/4559)

What happened?

An expression of the form: forward slash + backward slash + extended ascii character causes a crash with thread '<unnamed>' panicked at 'assertion failed: self.source.is_char_boundary(self.position)', /rome/tools/crates/rome_js_parser/src/lexer/mod.rs:545:9

Example failing cases (€ can be replaced with any extended ascii character):

  1. /\€
  2. /\€/

Not failing:

  1. /\

Affected Formatters:
rome_format_d_ts
rome_format_jsx
rome_format_module
rome_format_script
rome_format_tsx
rome_format_typescript

Expected result

Should not crash.

Code of Conduct

  • I agree to follow Rome's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    S-To triageStatus: user report of a possible bug that needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions