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

Memory leaks when destructors panic #26

Closed
steffahn opened this issue Oct 5, 2021 · 2 comments · Fixed by #27
Closed

Memory leaks when destructors panic #26

steffahn opened this issue Oct 5, 2021 · 2 comments · Fixed by #27

Comments

@steffahn
Copy link
Contributor

steffahn commented Oct 5, 2021

For more info see the branch I’ve already mentioned in #24, i.e.
steffahn/self_cell@fix_drop_order...fix_double_free_and_leaks
in particular, the highlighted test cases.

(FYI, that branch currently also contains #25)

These memory leaks are not a soundness issue; still, fixing the problem is a nice-to-have improvement.

I can rebase, resolve merge conflicts, and open a PR once #21 and #25 are merged.

@Voultapher
Copy link
Owner

panic in Drop needs some getting used to when coming from the noexcept C++ world.

@Voultapher
Copy link
Owner

Voultapher commented Oct 5, 2021

I wonder if ouroboros has the same issue. Note, I don't think they have something akin to into_owner though. So I suspect it only applies to the full struct drop case.

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 a pull request may close this issue.

2 participants