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

Panic on 'for .. of' loop in async function #600

Closed
cauthmann opened this issue Jan 21, 2020 · 3 comments
Closed

Panic on 'for .. of' loop in async function #600

cauthmann opened this issue Jan 21, 2020 · 3 comments
Assignees
Milestone

Comments

@cauthmann
Copy link

Thanks for your quick work on 598. I tried to run swc over our test-suite to get you some real-world testcases, but got consistent panics on several files. I reduced it to a minimal testcase which consistently panics, both with the official binaries and with npm_config_build_from_source=1, on x64 linux.

The minimal testcase is this:

async function foo() {
	for (let a of b) {
	}
}

Removing the async fixes it, removing the loop (or using a different kind of loop) fixes it.

npx swc --no-swcrc test.js

fatal runtime error: failed to initiate panic, error 5

No way to get a panic message or backtrace, unfortunately. I wish there was a cli binary that didn't go through node..

@kdy1 kdy1 self-assigned this Jan 21, 2020
@kdy1 kdy1 added this to the v1.1.14 milestone Jan 21, 2020
@kdy1 kdy1 assigned kdy1 and unassigned kdy1 Jan 21, 2020
kdy1 added a commit to kdy1/swc that referenced this issue Jan 22, 2020
kdy1 added a commit to kdy1/swc that referenced this issue Jan 23, 2020
@bors bors bot closed this as completed in 20e37ea Jan 23, 2020
@kdy1
Copy link
Member

kdy1 commented Jan 23, 2020

I've published a new version

@cauthmann
Copy link
Author

Confirmed fixed in 1.1.14, thank you!

@swc-bot
Copy link
Collaborator

swc-bot commented Oct 28, 2022

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 Oct 28, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging a pull request may close this issue.

3 participants