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: should not free native compiler while compiler is running #8437

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

h-a-n-a
Copy link
Contributor

@h-a-n-a h-a-n-a commented Nov 14, 2024

Summary

Fixed MultiCompiler test. Some cases tested scenarios where closing the compiler when it is still running. However in previous memory leak fix PR, we freed the native compiler when compiler.close is called. Thus, causing a segmentation fault.

To fix this issue, we need to add a compiler status check to free only if it's not running.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@github-actions github-actions bot added release: bug fix release: bug related release(mr only) team The issue/pr is created by the member of Rspack. labels Nov 14, 2024
Copy link

netlify bot commented Nov 14, 2024

Deploy Preview for rspack canceled.

Name Link
🔨 Latest commit bfb29d7
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/6735b410f27c660008cdd8e9

@h-a-n-a h-a-n-a changed the title fix: should not free native compiler while compiler is runnin fix: should not free native compiler while compiler is running Nov 14, 2024
@h-a-n-a h-a-n-a marked this pull request as ready for review November 14, 2024 08:36
@h-a-n-a h-a-n-a enabled auto-merge (squash) November 14, 2024 08:36
@h-a-n-a h-a-n-a merged commit b8db757 into main Nov 14, 2024
45 of 46 checks passed
@h-a-n-a h-a-n-a deleted the fix-multi-compiler branch November 14, 2024 09:01
@h-a-n-a h-a-n-a mentioned this pull request Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release: bug fix release: bug related release(mr only) 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