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 when transpiling "if" statement with @swc/core version > 1.3.100 in deno inside Alpine Linux docker container #8695

Closed
benStre opened this issue Mar 5, 2024 · 3 comments
Labels

Comments

@benStre
Copy link

benStre commented Mar 5, 2024

Describe the bug

This is a very strange bug and I am not sure where it originates from.
It might be a Deno issue, a Rust bug (rust-lang/rust#91979 ?) or an issue in Alpine Linux.

What I know for sure is that the error does not occur for swc versions <= 1.3.100.
I could also not reproduce it with node or the swc cli, or in another Linux docker container (e.g. ubuntu).

It only occurs when using

  • @swc/core > 1.3.100
  • deno (version 1.41.1)
  • Alpine Linux docker container (Docker version 24.0.2)

Input code

import {transform} from "npm:@swc/core@1.3.101";
await transform("if(true){}")

Config

Default configuration:

{
  "jsc": {
    "parser": {
      "syntax": "ecmascript",
      "jsx": false,
      "dynamicImport": false,
      "privateMethod": false,
      "functionBind": false,
      "exportDefaultFrom": false,
      "exportNamespaceFrom": false,
      "decorators": false,
      "decoratorsBeforeExport": false,
      "topLevelAwait": false,
      "importMeta": false
    },
    "transform": null,
    "target": "es5",
    "loose": false,
    "externalHelpers": false,
    "keepClassNames": false
  },
  "minify": false
}

Playground link (or link to the minimal reproduction)

https://github.com/unyt-org/swc-segfault-example

SWC Info output

No response

Expected behavior

The transform function should return a transpiled string.

Actual behavior

The process exits with a Segmentation fault (core dumped) (exit code 139) and no further error messages.

Version

1.3.101

Additional context

No response

@benStre benStre added the C-bug label Mar 5, 2024
@kdy1
Copy link
Member

kdy1 commented Mar 5, 2024

Closing as not actionable.

@kdy1 kdy1 closed this as not planned Won't fix, can't repro, duplicate, stale Mar 5, 2024
@swc-bot
Copy link
Collaborator

swc-bot commented Apr 4, 2024

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@swc-project swc-project locked as resolved and limited conversation to collaborators Apr 4, 2024
@kdy1
Copy link
Member

kdy1 commented Apr 11, 2024

See: #8840

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

3 participants