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

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

Open
1 task done
MahnurA opened this issue Jul 11, 2023 · 0 comments
Open
1 task done
Labels
S-To triage Status: user report of a possible bug that needs to be triaged

Comments

@MahnurA
Copy link

MahnurA commented Jul 11, 2023

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
@MahnurA MahnurA added the S-To triage Status: user report of a possible bug that needs to be triaged label Jul 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-To triage Status: user report of a possible bug that needs to be triaged
Projects
None yet
Development

No branches or pull requests

1 participant