Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Fix panic and generation issue in Arena::drain() #45

Merged
merged 1 commit into from
Apr 26, 2021

Conversation

taiki-e
Copy link
Contributor

@taiki-e taiki-e commented Apr 24, 2021

This fixes the second and fourth issues of #30.

  1. If you add some elements and then use Arena::drain(), again, this should bump the generation and it doesn't, which is a similar bug.
  1. drain() doesn't fix up the free list or other state. After you drain the whole arena, is still has a positive len(). Then you'll get asserts when you try to use the arena. I'm not sure what exactly will be involved to fix this.

Copy link
Owner

@fitzgen fitzgen left a comment

Choose a reason for hiding this comment

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

Thanks!

@fitzgen fitzgen merged commit 72975c8 into fitzgen:master Apr 26, 2021
@taiki-e taiki-e deleted the drain branch April 26, 2021 17:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants