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
SIGSEGV on extremely nested if
s
#6813
Comments
It seems that this example is also a reproduction for #5470, as
|
I don't think this can be fixed easily. To make error graceful, we have to handle allocation failure, but it's definitely not an easy task. |
Linked issues mentioned using rust-lang/stacker to avoid stack overflows, but as I understand integrating it would not be trivial. |
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. |
Describe the bug
Inspired by denoland/deno#15117 and #5470.
When running swc on a file with 10000 nested
if
s, it crashes with SIGSEGV.To reproduce locally, use these commands:
Playground link
https://play.swc.rs/?version=1.3.26&code=H4sIAAAAAAAAA%2B3IsQmAMBRAwd4pfqmNCziORAkEA0YrcXcLSxewOF5zvLxEf%2BxnGuKKzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwfz3VrtaSx1PV9U9ySJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSJEmSpD%2FUPSLuBdjzIgIA&config=H4sIAAAAAAAAA0WMTQrEIAxG75K1286id5hDBCctFv9IUhgR714tlu7C915ehUMsrBUyshCPS0pU%2FMMKZAOKZZcVTNf6tKEXagYUeScdiiyd%2BZSEJjUQXHRbGSWbQmYSeRHG3T9m66GQfucYKmjJdAc%2F0N7G%2FHPynaLySe0Cj9ke9LUAAAA%3D
Expected behavior
Either a correct output, or a sensible error.
Actual behavior
Version
@swc/cli: 0.1.59
,@swc/core: 1.3.26
The text was updated successfully, but these errors were encountered: