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 defer variable corruption #761

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rajashekar007
Copy link

As deferements are iterated using range based loop, when there is a recursive defer, it's corrupting the variable. The loop iteration has been changed to use index based to fix the same.

Kindly review it.

@AzothAmmo
Copy link
Contributor

This strikes me as likely an incorrect usage of cereal::defer - it shouldn't be used in situations where there is any recursive structure to serialize as this defeats the purpose of the deferment in the first place.

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