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

swc.minifySync panics on some inputs #8868

Open
s100 opened this issue Apr 16, 2024 · 0 comments
Open

swc.minifySync panics on some inputs #8868

s100 opened this issue Apr 16, 2024 · 0 comments
Assignees
Labels
Milestone

Comments

@s100
Copy link

s100 commented Apr 16, 2024

Describe the bug

When trying to minify certain (not very well-formed) strings, swc.minifySync(...) panics and terminates the Node.js process.

Input code

import swc from '@swc/core'
try {
  swc.minifySync('\u001a\u0000', {
    mangle: true,
    module: true
  })
} finally {
  console.log('this should be printed no matter what, but is not')
}

Config

{
  "//": "I have none"
}

Playground link (or link to the minimal reproduction)

https://play.swc.rs/?version=1.3.100&code=H4sIAAAAAAAAAzWMsQoCMRBE%2B0D%2BYbs94Thja2VvYXGtTYjJEUh2ZS9Bgty%2Fa%2FBshuHNY2J%2BshRYXw6CcAa8fOvRsXjUqkiDt1bQ5ylHiqHNjdyA92rMyfY0BsefA5AtLcmfoUj14474Uf%2Bok%2B2g1QYhkk1p%2F3ZMKyc%2FJV4GvF2xG1p9AAzNzlaYAAAA&config=H4sIAAAAAAAAA1WPSw7DIAwF9zkF8rrbdtE79BAWdSIifrKJVBTl7iUE0maH3xsz8jooBbNoeKq1PMsQkYX4nEsi2Sf8lARIOxTNJia49XaWvRrRCtVoOxpIyBOluiX3hoMNQajjLXPGmzH%2FC3VwkUnkCu4o%2BsnSVTc0JbjwXmrZDkk50qF%2FwA%2FqsvNjMPLqm4kXGrYvhlQioBQBAAA%3D

SWC Info output

Operating System:
    Platform: win32
    Arch: x64
    Machine Type: x86_64
    Version: Windows 10 Enterprise
    CPU: (16 cores)
        Models: 11th Gen Intel(R) Core(TM) i7-11850H @ 2.50GHz

Binaries:
    Node: 18.17.1
    npm: N/A
    Yarn: N/A
    pnpm: N/A

Relevant Packages:
    @swc/core: 1.4.14
    @swc/helpers: N/A
    @swc/types: 0.1.6


SWC Config:
    output: N/A
    .swcrc path: N/A

Next.js info:
    output: N/A

Expected behavior

In this case I believe the correct behaviour would be to throw an exception which can be caught, so that execution can continue.

Actual behavior

thread '<unnamed>' panicked at C:\Users\runneradmin\.cargo\registry\src\index.crates.io-6f17d22bba15001f\napi-2.12.5\src\error.rs:330:1:
called `Result::unwrap()` on an `Err` value: NulError(67, [10, 32, 32, 27, 91, 51, 49, 109, 120, 27, 91, 48, 109, 32, 85, 110, 101, 120, 112, 101, 99, 116, 101, 100, 32, 99, 104, 97, 114, 97, 99, 116, 101, 114, 32, 39, 92, 117, 123, 49, 97, 125, 39, 10, 32, 32, 32, 44, 45, 45, 45, 45, 10, 32, 27, 91, 50, 109, 49, 27, 91, 48, 109, 32, 124, 32, 26, 0, 10, 32, 32, 32, 58, 32, 27, 91, 51, 49, 59, 49, 109, 94, 27, 91, 48, 109, 10, 32, 32, 32, 96, 45, 45, 45, 45, 10, 10, 10, 67, 97, 117, 115, 101, 100, 32, 98, 121, 58, 10, 32, 32, 32, 32, 48, 58, 32, 102, 97, 105, 108, 101, 100, 32, 116, 111, 32, 112, 97, 114, 115, 101, 32, 105, 110, 112, 117, 116, 32, 102, 105, 108, 101, 10, 32, 32, 32, 32, 49, 58, 32, 83, 121, 110, 116, 97, 120, 32, 69, 114, 114, 111, 114, 10, 10, 83, 116, 97, 99, 107, 32, 98, 97, 99, 107, 116, 114, 97, 99, 101, 58, 10, 32, 32, 32, 48, 58, 32, 110, 97, 112, 105, 95, 114, 101, 103, 105, 115, 116, 101, 114, 95, 109, 111, 100, 117, 108, 101, 95, 118, 49, 10, 32, 32, 32, 49, 58, 32, 110, 97, 112, 105, 95, 114, 101, 103, 105, 115, 116, 101, 114, 95, 109, 111, 100, 117, 108, 101, 95, 118, 49, 10, 32, 32, 32, 50, 58, 32, 110, 97, 112, 105, 95, 114, 101, 103, 105, 115, 116, 101, 114, 95, 109, 111, 100, 117, 108, 101, 95, 118, 49, 10, 32, 32, 32, 51, 58, 32, 119, 97, 115, 109, 101, 114, 95, 118, 109, 95, 105, 109, 112, 111, 114, 116, 101, 100, 95, 109, 101, 109, 111, 114, 121, 51, 50, 95, 97, 116, 111, 109, 105, 99, 95, 110, 111, 116, 105, 102, 121, 10, 32, 32, 32, 52, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 32, 53, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 32, 54, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 32, 55, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 32, 56, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 32, 57, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 49, 48, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 49, 49, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 67, 112, 117, 80, 114, 111, 102, 105, 108, 101, 115, 67, 111, 108, 108, 101, 99, 116, 105, 111, 110, 58, 58, 112, 114, 111, 102, 105, 108, 101, 115, 10, 32, 32, 49, 50, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 66, 117, 105, 108, 116, 105, 110, 115, 58, 58, 99, 111, 100, 101, 10, 32, 32, 49, 51, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 66, 117, 105, 108, 116, 105, 110, 115, 58, 58, 99, 111, 100, 101, 10, 32, 32, 49, 52, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 66, 117, 105, 108, 116, 105, 110, 115, 58, 58, 99, 111, 100, 101, 10, 32, 32, 49, 53, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 66, 117, 105, 108, 116, 105, 110, 115, 58, 58, 99, 111, 100, 101, 10, 32, 32, 49, 54, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 49, 55, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 49, 56, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 49, 57, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 48, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 49, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 50, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 51, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 52, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 53, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 54, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 55, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 56, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 50, 57, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 48, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 49, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 50, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 51, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 52, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 53, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 54, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 55, 58, 32, 60, 117, 110, 107, 110, 111, 119, 110, 62, 10, 32, 32, 51, 56, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 51, 57, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 83, 101, 116, 117, 112, 73, 115, 111, 108, 97, 116, 101, 68, 101, 108, 101, 103, 97, 116, 101, 58, 58, 83, 101, 116, 117, 112, 72, 101, 97, 112, 10, 32, 32, 52, 48, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 69, 120, 101, 99, 117, 116, 105, 111, 110, 58, 58, 67, 97, 108, 108, 87, 97, 115, 109, 10, 32, 32, 52, 49, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 69, 120, 101, 99, 117, 116, 105, 111, 110, 58, 58, 67, 97, 108, 108, 10, 32, 32, 52, 50, 58, 32, 118, 56, 58, 58, 70, 117, 110, 99, 116, 105, 111, 110, 58, 58, 67, 97, 108, 108, 10, 32, 32, 52, 51, 58, 32, 110, 111, 100, 101, 58, 58, 67, 97, 108, 108, 98, 97, 99, 107, 83, 99, 111, 112, 101, 58, 58, 126, 67, 97, 108, 108, 98, 97, 99, 107, 83, 99, 111, 112, 101, 10, 32, 32, 52, 52, 58, 32, 110, 111, 100, 101, 58, 58, 77, 97, 107, 101, 67, 97, 108, 108, 98, 97, 99, 107, 10, 32, 32, 52, 53, 58, 32, 110, 111, 100, 101, 95, 97, 112, 105, 95, 116, 104, 114, 111, 119, 95, 115, 121, 110, 116, 97, 120, 95, 101, 114, 114, 111, 114, 10, 32, 32, 52, 54, 58, 32, 117, 118, 95, 112, 105, 112, 101, 95, 112, 101, 110, 100, 105, 110, 103, 95, 116, 121, 112, 101, 10, 32, 32, 52, 55, 58, 32, 117, 118, 95, 114, 117, 110, 10, 32, 32, 52, 56, 58, 32, 110, 111, 100, 101, 58, 58, 83, 112, 105, 110, 69, 118, 101, 110, 116, 76, 111, 111, 112, 10, 32, 32, 52, 57, 58, 32, 118, 56, 58, 58, 105, 110, 116, 101, 114, 110, 97, 108, 58, 58, 105, 110, 116, 101, 114, 112, 114, 101, 116, 101, 114, 58, 58, 66, 121, 116, 101, 99, 111, 100, 101, 65, 114, 114, 97, 121, 87, 114, 105, 116, 101, 114, 58, 58, 99, 111, 110, 115, 116, 97, 110, 116, 95, 97, 114, 114, 97, 121, 95, 98, 117, 105, 108, 100, 101, 114, 10, 32, 32, 53, 48, 58, 32, 110, 111, 100, 101, 58, 58, 73, 110, 105, 116, 105, 97, 108, 105, 122, 101, 79, 110, 99, 101, 80, 101, 114, 80, 114, 111, 99, 101, 115, 115, 10, 32, 32, 53, 49, 58, 32, 110, 111, 100, 101, 58, 58, 83, 116, 97, 114, 116, 10, 32, 32, 53, 50, 58, 32, 65, 69, 83, 95, 99, 98, 99, 95, 101, 110, 99, 114, 121, 112, 116, 10, 32, 32, 53, 51, 58, 32, 105, 110, 102, 108, 97, 116, 101, 86, 97, 108, 105, 100, 97, 116, 101, 10, 32, 32, 53, 52, 58, 32, 66, 97, 115, 101, 84, 104, 114, 101, 97, 100, 73, 110, 105, 116, 84, 104, 117, 110, 107, 10, 32, 32, 53, 53, 58, 32, 82, 116, 108, 85, 115, 101, 114, 84, 104, 114, 101, 97, 100, 83, 116, 97, 114, 116])
stack backtrace:
   0:     0x7ffcbd386002 - napi_register_module_v1
   1:     0x7ffcbd3a6c6d - napi_register_module_v1
   2:     0x7ffcbd381881 - napi_register_module_v1
   3:     0x7ffcbd385e2a - napi_register_module_v1
   4:     0x7ffcbd3882d9 - napi_register_module_v1
   5:     0x7ffcbd387f95 - napi_register_module_v1
   6:     0x7ffcbd3887f4 - napi_register_module_v1
   7:     0x7ffcbd3886c9 - napi_register_module_v1
   8:     0x7ffcbd386909 - napi_register_module_v1
   9:     0x7ffcbd388396 - napi_register_module_v1
  10:     0x7ffcbea3f3f7 - napi_register_module_v1
  11:     0x7ffcbea3f933 - napi_register_module_v1
  12:     0x7ffcbd068789 - napi_register_module_v1
  13:     0x7ffcbd0689af - napi_register_module_v1
  14:     0x7ffcbcb2106f - <unknown>
  15:     0x7ff72e44bb5f - v8::internal::CpuProfilesCollection::profiles
  16:     0x7ff72ee674fd - v8::internal::Builtins::code
  17:     0x7ff72ee67109 - v8::internal::Builtins::code
  18:     0x7ff72ee673cc - v8::internal::Builtins::code
  19:     0x7ff72ee67230 - v8::internal::Builtins::code
  20:     0x7ff72ef4bf71 - v8::internal::SetupIsolateDelegate::SetupHeap
  21:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  22:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  23:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  24:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  25:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  26:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  27:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  28:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  29:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  30:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  31:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  32:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  33:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  34:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  35:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  36:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  37:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  38:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  39:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  40:     0x7ff72eecf884 - v8::internal::SetupIsolateDelegate::SetupHeap
  41:     0x7ff6af086c3c - <unknown>
  42:     0x7ff72eecde90 - v8::internal::SetupIsolateDelegate::SetupHeap
  43:     0x7ff72eecda8b - v8::internal::SetupIsolateDelegate::SetupHeap
  44:     0x7ff72ed983c2 - v8::internal::Execution::CallWasm
  45:     0x7ff72ed97bef - v8::internal::Execution::Call
  46:     0x7ff72ee904c2 - v8::Function::Call
  47:     0x7ff72e4afb20 - node::CallbackScope::~CallbackScope
  48:     0x7ff72e4b0035 - node::MakeCallback
  49:     0x7ff72e4650e8 - node_api_throw_syntax_error
  50:     0x7ff72e4d15c8 - uv_pipe_pending_type
  51:     0x7ff72e4dc5fb - uv_run
  52:     0x7ff72e4aef25 - node::SpinEventLoop
  53:     0x7ff72e3bd1b8 - v8::internal::interpreter::BytecodeArrayWriter::constant_array_builder
  54:     0x7ff72e4422e2 - node::InitializeOncePerProcess
  55:     0x7ff72e443b13 - node::Start
  56:     0x7ff72e247f2c - AES_cbc_encrypt
  57:     0x7ff72f4c40a8 - inflateValidate
  58:     0x7ffd3ee4257d - BaseThreadInitThunk
  59:     0x7ffd4070aa58 - RtlUserThreadStart

Process finished with exit code -1073740791 (0xC0000409)

Version

1.4.14

Additional context

I'm trying to incorporate @swc/core into an internal tool. It's probable that at least a few users of the tool will inadvertently configure it to try to minify files which can't be minified, because they aren't JavaScript, or aren't even text. When this happens, the tool needs to be able to handle the error and continue onwards. In this case the file which broke was a PNG image file. The string '\u001a\u0000' is a minimal recreation of the break, from whittling the PNG data down.

Thank you for a great project!

@s100 s100 added the C-bug label Apr 16, 2024
@kdy1 kdy1 added this to the Planned milestone Apr 18, 2024
@kdy1 kdy1 self-assigned this Apr 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants