parcel icon indicating copy to clipboard operation
parcel copied to clipboard

`<style>` causes SIGSEGV aka. Segmentation fault on Oracle Linux Server 7.9 with Parcel 2

Open mathieucaroff opened this issue 1 year ago • 3 comments

🐛 bug report

I'm trying to build my web page on Linux and I get a SIGSEGV error. The error does not occur on Windows.

🎛 Configuration (.babelrc, package.json, cli command)

opc@ina:~/minimal2 0b1$ ls -la
total 88
drwxrwxr-x.  5 opc opc  4096 Jul 15 19:31 .
drwx------. 29 opc opc  4096 Jul 15 19:31 ..
drwxrwxr-x.  2 opc opc    24 Jul 15 19:32 dist
-rw-rw-r--.  1 opc opc    96 Jul 15 19:31 index.html
drwxrwxr-x. 99 opc opc  4096 Jul 15 19:26 node_modules
-rw-rw-r--.  1 opc opc   115 Jul 15 19:29 package.json
drwxrwxr-x.  2 opc opc  4096 Jul 15 19:32 .parcel-cache
-rw-rw-r--.  1 opc opc 64763 Jul 15 19:26 yarn.lock
opc@ina:~/minimal2 0b1$ cat package.json
{
  "name": "minimal2",
  "version": "1.0.0",
  "license": "MIT",
  "dependencies": {
    "parcel": "^2.6.2"
  }
}
opc@ina:~/minimal2 0b1$ cat index.html
<!DOCTYPE html>
<html lang="en">
<head>
</head>
<body>
    <style>
    </style>
</body>
</html>

Please note the <style> element in index.html. Its presence causes the bug.

🤔 Expected Behavior

The project should build and exit with code 0, marking success.

😯 Current Behavior

The projects builds but an error occurs at the end and it exits with a non-zero code, marking failure.

🔦 Context

This makes my automatic deployment script fail.

💻 Code Sample

Here is a gist, in case you need the yarn.lock file:

https://gist.github.com/mathieucaroff/907232cbe512f3ccca5ce687266884d7

🌍 Your Environment

Note: the problem occurs with both package managers. With yarn it is "SIGSEGV" with npm, it is "Segmentation fault (core dumped)".

Software Version(s)
Parcel 2.6.2
Node v14.15.0
npm 6.14.8
yarn 1.22.10
Operating System Oracle Linux Server 7.9
Kernel 4.14.35-1902.306.2.el7uek.x86_64 #2 SMP Fri Aug 28 14:42:11 PDT 2020 x86_64

mathieucaroff avatar Jul 15 '22 20:07 mathieucaroff

The bug also occurs with node v16.16.0

mathieucaroff avatar Jul 15 '22 22:07 mathieucaroff

Downgrading parcel to 2.6.0, 2.5.0 or even 2.0.0 does not affect the issue.

mathieucaroff avatar Jul 17 '22 07:07 mathieucaroff

The empty style element makes it sound like https://github.com/parcel-bundler/parcel/pull/7995 but for CSS instead of JS assets with no content.

mischnic avatar Jul 17 '22 17:07 mischnic

This problem still affects me. I need to check if it is still present in newer versions of Parcel though.

mathieucaroff avatar Jan 14 '23 22:01 mathieucaroff

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs.

github-actions[bot] avatar Jul 14 '23 00:07 github-actions[bot]