Skip to content

Fix leaking args in analysis/test's main #653

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

Merged
merged 1 commit into from
Aug 29, 2022

Conversation

kkysen
Copy link
Contributor

@kkysen kkysen commented Aug 26, 2022

This fixes the memory leakage of args in main in analysis/test by not .into_raw()ing the CStrings, but storing them in a Vec and using .as_ptr().

Checked by miri (in #650) to remove the leaks created in main.

…t `.into_raw()`ing the `CString`s, but storing them in a `Vec` and using `.as_ptr()`.
@kkysen kkysen merged commit c618eeb into master Aug 29, 2022
@kkysen kkysen deleted the kkysen/analysis-test-fix-leaked-args branch August 29, 2022 14:31
@aneksteind
Copy link
Contributor

I'm not sure if this portion of the code was output of the transpiler or not. We should check that this behavior you've fixed isn't present generally.

@kkysen
Copy link
Contributor Author

kkysen commented Aug 29, 2022

I think (?) it is. I opened #649 for that, but wanted to fix it here first since it's simpler.

@aneksteind
Copy link
Contributor

Ah, ok -- missed #649. That sounds good.

This was referenced Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants