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
Description
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):
- /\€
- /\€/
Not failing:
- /\
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