lightningcss
lightningcss copied to clipboard
Segmentation Fault error on calc()/clamp() expression
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
Related issue from last year: https://github.com/parcel-bundler/lightningcss/issues/166
I tried excluding the ClampFunction feature, but it still crashes.
Please raise the priority of this error.