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 implicit synthesis of CaseTransition #59

Merged
merged 1 commit into from
Jun 12, 2023

Conversation

etan-status
Copy link
Contributor

Transitioning the case of a case object without full reinitialization leads to undefined behaviour. Don't do such transitions implicitly, and require explicit readValue override for such types in those cases.

Transitioning the case of a case object without full reinitialization
leads to undefined behaviour. Don't do such transitions implicitly,
and require explicit `readValue` override for such types in those cases.
etan-status added a commit to status-im/nimbus-eth2 that referenced this pull request Jun 12, 2023
Override default Json parsing for keystore case objects to avoid
`CaseTransition` logic to be emitted. When parsing the discriminator,
reinitialize the entire object instead of implicitly changing it,
to avoid UB and also possible oversights when extending the object.
See status-im/nim-serialization#59
@tersec tersec merged commit c23b499 into master Jun 12, 2023
12 checks passed
@tersec tersec deleted the dev/etan/sa-casetransition branch June 12, 2023 21:17
etan-status added a commit to status-im/nimbus-eth2 that referenced this pull request Jun 16, 2023
Override default Json parsing for keystore case objects to avoid
`CaseTransition` logic to be emitted. When parsing the discriminator,
reinitialize the entire object instead of implicitly changing it,
to avoid UB and also possible oversights when extending the object.
See status-im/nim-serialization#59
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