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

fix: passing option as &str caused memory leak in builtin:swc-loader #4235

Merged
merged 1 commit into from
Sep 25, 2023

Conversation

h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Sep 22, 2023

Summary

Use String instead of &str to workaround a memory leak issue.

thread 'tokio-runtime-worker' panicked at 'Could not parse builtin:swc-loader options:Some("�N�.\u{c7bda}�"),error: Error("expected value", line: 1, column: 1)', crates/rspack_binding_options/src/options/raw_module/mod.rs:42:11

Related: napi-rs/napi-rs#1022

Test Plan

Require Documentation?

  • No
  • Yes, the corresponding rspack-website PR is __

@github-actions github-actions bot added release: bug fix team The issue/pr is created by the member of Rspack. labels Sep 22, 2023
@h-a-n-a

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

9aoy
9aoy previously approved these changes Sep 25, 2023
@h-a-n-a

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@h-a-n-a
Copy link
Contributor Author

h-a-n-a commented Sep 25, 2023

!canary

@github-actions
Copy link
Contributor

0.3.4-canary-56f4c06-20230925050805

@h-a-n-a h-a-n-a changed the title fix: use utf-16 in builtin:swc-loader fix: passing option as &str caused memory leak in builtin:swc-loader Sep 25, 2023
@h-a-n-a h-a-n-a marked this pull request as ready for review September 25, 2023 08:58
@h-a-n-a h-a-n-a enabled auto-merge September 25, 2023 09:02
@h-a-n-a h-a-n-a added this pull request to the merge queue Sep 25, 2023
Merged via the queue into main with commit 591f55d Sep 25, 2023
19 checks passed
@h-a-n-a h-a-n-a deleted the fix/utf16 branch September 25, 2023 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants