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 unsound interaction between Array::over and Drop #634

Merged
merged 9 commits into from
Aug 19, 2022

Conversation

workingjubilee
Copy link
Member

This closes #633.
It also partially addresses #631 (i.e. for this type).
It introduces a new problem (leaking arrays) that I hope to fix soon,
as part of trying to fix, in the future, #627.

These tests reveal an unsoundness caused by implicit drop of Arrays,
when the Drop implementation is called, causing pfree to be called.
Memory leak, shmemory leak.
If we double free, we're in for much worse than a leak.
This pointer might actually prove important at some point,
as it points back to the original, pre-detoasting varlena.
More analysis is required before we ditch it.
@workingjubilee workingjubilee linked an issue Aug 17, 2022 that may be closed by this pull request
@workingjubilee
Copy link
Member Author

cc @mhov you may be interested in knowing about the other problems with the array type.

@workingjubilee workingjubilee merged commit 72f1e4a into develop Aug 19, 2022
@eeeebbbbrrrr eeeebbbbrrrr deleted the fix-issue-633 branch June 20, 2023 17:58
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.

Array::over with Array's drop impl is unsound
1 participant