parcel-bundler / parcel-bundler/lightningcss
Segmentation fault 11
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7.7k
- Forks
- 302
- PR merge metrics
- No merged PRs in 30d
Description
Hi @devongovett! I'm an engineer at Webflow and we're also using lightningcss (thank you! 🙏) to help bundle our user's css. We had a report that one of our user's CSS is causing a Segmentation fault 11 error on our server, and found that it's related to some calc usage:
You can see it erroring on the playground here:
We're on version 1.24.1, but it seems to be occurring on the latest as well. This is the snippet:
.my-class {
display: block;
background-color: var(--transparent);
transform: translate(15%, 0px) rotate(-90deg);
width: calc(100dvh - 10.5rem);
/* uncomment below to break */
/* height: calc((100dvh - 10.5rem) + (4vh + 230px)); */
}
I saw that you've pushed a commit to fix related issues, but it seems like it also needs to be able to handle parens to group operations. Let me know if you'd like additional information, and thank you for this awesome library!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash in the lightningcss playground using the provided CSS, then inspect the referenced commit and the calc parsing and minification paths. Done means the parenthesized calc expression no longer causes a segmentation fault and a regression test covers this input.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100