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

Drop does not clear up properly for BinaryHeap/HashMap/Stash #581

Closed
cmichi opened this issue Nov 16, 2020 · 0 comments · Fixed by #600
Closed

Drop does not clear up properly for BinaryHeap/HashMap/Stash #581

cmichi opened this issue Nov 16, 2020 · 0 comments · Fixed by #600
Assignees
Labels
A-ink_storage [ink_storage] Work Item C-bug Something isn't working

Comments

@cmichi
Copy link
Collaborator

cmichi commented Nov 16, 2020

I created/adapted Drop tests for some of our datastructures (implementation here).

Those fail though:

failures:
    collections::binary_heap::tests::drop_works
    collections::hashmap::tests::drop_works
    collections::stash::tests::drop_works

It seems the issue is that Pack does not implement Drop, which from my understanding can result in corrupted storage since e.g. for Stash its Drop implementation currently only clears Stash::elems: LazyIndexMap<T>, but not Stash::header: Pack<Header>.

@cmichi cmichi added C-bug Something isn't working A-ink_storage [ink_storage] Work Item labels Nov 16, 2020
@cmichi cmichi self-assigned this Nov 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ink_storage [ink_storage] Work Item C-bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant