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

🐛 Big pack of js/ts files that crashes rome #4323

Open
qarmin opened this issue Mar 26, 2023 · 4 comments
Open

🐛 Big pack of js/ts files that crashes rome #4323

qarmin opened this issue Mar 26, 2023 · 4 comments
Labels
S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@qarmin
Copy link

qarmin commented Mar 26, 2023

Environment information

Rome 763fd98

CLI:
  Version:              0.0.0
  Color support:        true

Platform:
  CPU Architecture:     x86_64
  OS:                   linux

Environment:
  ROME_LOG_DIR:         unset
  NO_COLOR:             unset
  TERM:                 "xterm-256color"
  JS_RUNTIME_VERSION:   unset
  JS_RUNTIME_NAME:      unset
  NODE_PACKAGE_MANAGER: unset

Rome Configuration:
  Status:               unset

Workspace:
  Open Documents:       0

Checking multiple broken javascript/typescript files(similar to astral-sh/ruff#3721) with rome check file, crashes app in several ways e.g.

Message: byte index 38 is not a char boundary; it is inside '\u{ac257}' (bytes 35..39) of `/ Copyright (c) 212 Ecm򜹵Internat򬉗onal.  "true" All rights 򩸭eserved.`
Source Location: /home/rafal/.cargo/git/checkouts/tools-29b78d514589893f/763fd98/crates/rome_text_size/src/range.rs:48:9
Thread Name: rome::console
Message: assertion failed: start <= end
Source Location: /home/rafal/.cargo/git/checkouts/tools-29b78d514589893f/763fd98/crates/rome_js_semantic/src/semantic_model/model.rs:332:19
Source Location: crates/rome_js_analyze/src/analyzers/complexity/no_multiple_spaces_in_regular_expression_literals.rs:129:41
Thread Name: rome::worker_1
Message: byte index 2 is not a char boundary; it is inside '\u{b8a08}' (bytes 1..5) of `/򸨈       from this software without specific prior written permission.`

List of files(I can easily produce more errors if needed):

Most of files is minimized, so contains max few lines of code

@qarmin qarmin added the S-To triage Status: user report of a possible bug that needs to be triaged label Mar 26, 2023
@ematipico
Copy link
Contributor

This should be fixed

@qarmin
Copy link
Author

qarmin commented May 8, 2023

Not sure if I checked correctly, but from 2103 files I still have panics with 2095 files with b4cfce9

@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug and removed S-To triage Status: user report of a possible bug that needs to be triaged labels May 8, 2023
@ematipico ematipico reopened this May 8, 2023
@denbezrukov
Copy link
Contributor

I've started looking into issues.

It's amazing!
What do you think if you could integrate your tests with #4559 ?

@qarmin
Copy link
Author

qarmin commented Aug 28, 2023

New pack of 1936 files that crashes with current latest git version of rome

Message: assertion failed: start <= end
  × processing panicked: begin <= end (1 <= 0) when slicing `/---`
Message: byte index 1 is not a char boundary; it is inside 'Ð' (bytes 0..2) of `Ð    expo`
Message: byte index 1 is out of bounds of ``

Broken.zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
Development

No branches or pull requests

3 participants