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

Segmentation Fault error on calc()/clamp() expression #611

Closed
illarionvk opened this issue Oct 23, 2023 · 2 comments
Closed

Segmentation Fault error on calc()/clamp() expression #611

illarionvk opened this issue Oct 23, 2023 · 2 comments

Comments

@illarionvk
Copy link

illarionvk commented Oct 23, 2023

The transform() compiler module crashes the Node process with a segfault on a calc()/clamp() expression:

.item {
  width: calc(100% - clamp(1.125rem, 1.25vw, 1.2375rem) - clamp(1.125rem, 1.25vw, 1.2375rem));
}

The playground also shows index out of bounds error and stops responding to code changes.

If I use the css declaration directly in a browser, the element calculates the width correctly.

Tested on lightningcss version 1.22.0, Node versions 18.18.0 and 16.19.0, amd64 Linux

Screenshot 2023-10-23 at 12 39 20

Related issue from last year:
#166

@illarionvk
Copy link
Author

I tried excluding the ClampFunction feature, but it still crashes.

@yisibl
Copy link
Contributor

yisibl commented Dec 29, 2023

Please raise the priority of this error.

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

No branches or pull requests

2 participants