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

🐛 Crash at empty default export #4670

Closed
1 task done
MahnurA opened this issue Jul 9, 2023 · 1 comment · Fixed by #4680
Closed
1 task done

🐛 Crash at empty default export #4670

MahnurA opened this issue Jul 9, 2023 · 1 comment · Fixed by #4680
Labels
A-Parser Area: parser L-JavaScript Langauge: JavaScript S-Bug: confirmed Status: report has been confirmed as a valid bug

Comments

@MahnurA
Copy link

MahnurA commented Jul 9, 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?

Empty default export, export default or export default ; causes a crash with thread '<unnamed>' panicked at 'Marker must either be completed or abandoned to avoid that children are implicitly attached to a marker's parent.', /.cargo/registry/src/index.crates.io-6f17d22bba15001f/drop_bomb-0.1.5/src/lib.rs:113:13

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 9, 2023
@ematipico ematipico added S-Bug: confirmed Status: report has been confirmed as a valid bug L-JavaScript Langauge: JavaScript A-Parser Area: parser and removed S-To triage Status: user report of a possible bug that needs to be triaged labels Jul 10, 2023
@denbezrukov
Copy link
Contributor

denbezrukov commented Jul 10, 2023

This is an awesome catch!
Thank you so much!

ematipico pushed a commit that referenced this issue Jul 11, 2023
* fix(rome_js_parser): Crash at empty default export #4670

* fix(rome_js_parser): Crash at empty default export #4670
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A-Parser Area: parser L-JavaScript Langauge: JavaScript S-Bug: confirmed Status: report has been confirmed as a valid bug
Projects
None yet
3 participants