Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Parse css sheet occur "fatal runtime error: stack overflow" #827

Open
GiveMe-A-Name opened this issue Oct 8, 2024 · 1 comment · May be fixed by #832
Open

[Bug] Parse css sheet occur "fatal runtime error: stack overflow" #827

GiveMe-A-Name opened this issue Oct 8, 2024 · 1 comment · May be fixed by #832

Comments

@GiveMe-A-Name
Copy link

GiveMe-A-Name commented Oct 8, 2024

# Cargo.toml
[dependencies]
lightningcss = { version = "=1.0.0-alpha.58", features = [
  "sourcemap",
  "browserslist",
  "visitor",
  "into_owned",
] }
// main.rs
use lightningcss::stylesheet::{ParserFlags, ParserOptions, StyleSheet};
fn main() {

    let code = "h1 { left: calc(100% - 16px - 0);}";

    let flag = ParserFlags::empty();

    let options = ParserOptions {
        filename: "abc".to_string(),
        css_modules: None,
        source_index: 0,
        error_recovery: false,
        warnings: None,
        flags: flag,
    };

    let style_sheet = StyleSheet::parse(code, options).unwrap();
}

It occur system error: fatal runtime error: stack overflow, when cargo run

@GiveMe-A-Name GiveMe-A-Name changed the title [Bug] Parse css sheet occur [fatal runtime error: stack overflow] [Bug] Parse css sheet occur "fatal runtime error: stack overflow" Oct 8, 2024
@GiveMe-A-Name
Copy link
Author

Fixed by: #832

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant