-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Plugin crashes with rkyv LayoutError. #6807
Comments
This is an issue of |
Yes, but the plugin is recompiled without any errors with the latest version. Shouldn't the AST match then? |
No. |
How to fix this then? I'm genuinely curious. I though that if the in-memory representation matches both in plugin and in host - then everything should be alright. |
You should update swc_core and publish a new version |
Yeah well as the first message said: versions are up to date.
Just tried it locally, same thing happens. Otherwise I would not open this issue 😃 |
I updated the repository. You can reproduce the bug there now. Uses debug build. |
It fails with
not layout error |
Well it crashes on my machine and some more users with LayoutError :( Some also report So it seems like there is definitely some kind of UB goind around, that's why I'm against closing the issue. Machine is BTW:
|
Tentatively assigned myself to try repro. (Well, if I have some time..) |
I've managed to find the cuplrit. This crash happens only if plugin is compiled with a nightly rustc. Will try to bisect further to find out on exactly which version of swc and nightly rustc this has started to happen, but I think this will still be helpful. |
@Drevoed it seems author of stailwc also encountered this issue, and had to fix nightly version in theirs pipilines https://github.com/arlyon/stailwc/blob/master/.github/workflows/release.yml#L21 |
In case it helps, I was facing |
Can you check |
@Drevoed What was your initial rustc version? |
@kdy1 also confirms |
Chiming in here as I have been trying to bisect nightly toolchain versions to find the exact one that crashes. At least regarding the heap oob error, it is not quite as simple as 1.66 vs 1.67. The error appears on all platforms on
That leads us to this set of commits: https://github.com/rust-lang/rust/commits/master?since=2022-11-23&until=2022-11-24 note: I also get the same issue on |
**Description:** This PR also updates `rkyv` to `=0.7.40`. **Related issue:** - Closes #6807.
Reopening as |
**Description:** This PR also updates `rkyv` to `=0.7.40`. **Related issue:** - Closes #6807.
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
SWC crashes when trying to invoke a plugin.
versions:
@swc/core
- 1.3.26swc_core
- 0.56.1backtrace:
Input code
Config
Playground link
No response
Expected behavior
Plugin runs.
Actual behavior
Plugin system crashes.
Version
1.3.26
Additional context
https://github.com/effector/swc-plugin
Repository of a plugin, you can run
cargo build
andpnpm i
to reproduce it there.The text was updated successfully, but these errors were encountered: