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

Avoid potential corruption during unpack of static_variant #254

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

abitmore
Copy link
Member

@abitmore abitmore commented Feb 6, 2024

Note: this is to redo #250 which was merged but reverted.

Before this change, when sv.set_which(w.value) is already done and the following sv.visit(...) throws, the staic_variant object passed into the function may be updated to something incomplete and may cause unintended problems.

Although usually we don't reuse static_variant variables, it's not guaranteed.

This does lead to additional data copy.

Reference: https://gitlab.syncad.com/hive/hive/-/merge_requests/1049

@abitmore abitmore added this to the core release 7.1.0 milestone Feb 6, 2024
Copy link

sonarcloud bot commented Feb 6, 2024

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant