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

SPMI: Fix a few memory leaks #104691

Merged
merged 2 commits into from
Jul 16, 2024
Merged

Conversation

jakobbotsch
Copy link
Member

No description provided.

@dotnet-issue-labeler dotnet-issue-labeler bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Jul 10, 2024
Copy link
Contributor

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch
See info in area-owners.md if you want to be subscribed.

@jakobbotsch
Copy link
Member Author

cc @dotnet/jit-contrib

@@ -446,8 +443,8 @@ int __cdecl main(int argc, char* argv[])
}
}

// Create a new CompileResult for this compilation (the CompileResult from the stored file is
// in originalCR if necessary).
delete mc->cr;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
delete mc->cr;
mc->Reset();

(also news up a CR, so below isn't needed)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense, made that change. I also moved the call to the end of the loop and only when there is going to be a next iteration of the repeatCount loop.

@jakobbotsch jakobbotsch requested a review from a team July 16, 2024 16:39
@jakobbotsch jakobbotsch merged commit 92abb8c into dotnet:main Jul 16, 2024
92 checks passed
@jakobbotsch jakobbotsch deleted the spmi-memory-leaks branch July 16, 2024 21:02
@github-actions github-actions bot locked and limited conversation to collaborators Aug 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants