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

Fails to serialize when entire vector contents are erased #108

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

julianharbarth
Copy link
Contributor

See the two added tests. The first one passes as expected. The second one fails.

Might be related, but I don't think neither of the two erase functions in basic_vector ensure that

c.require((el->size() == 0) == (el->el_ == nullptr), "vec size=0 <=> ptr=0");
or similar are satisfied.

@felixguendling felixguendling merged commit ba115f8 into felixguendling:master Sep 28, 2021
@felixguendling
Copy link
Owner

Thanks! I think #109 should fix the problem.

For in-memory vectors the condition does not apply. However, the require you mentioned is only checked for serialized vectors where the condition is always true.

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.

None yet

2 participants