issue #241: add infrastructure for range checking#296
Open
seanm wants to merge 2 commits into
Open
Conversation
Contributor
Author
|
@tbeu I still need to fill out all the variants of the conversion functions, but any thoughts on this general approach? |
Contributor
Author
Owner
|
CI is failing. This needs to be addressed. |
Contributor
Author
That's expected. This is WIP. I'd like to know if you find the general approach acceptable before I spend more time to finish it off. |
Owner
|
So well, if it works and solves the issue... |
Contributor
Author
OK I'll finish it off then... |
8726eab to
2c6094d
Compare
Contributor
Author
|
@tbeu ok I've decided to split this into 2 PRs since there's 1 test failing that needs investigation. So for now, this first PR only adds the the infrastructure to eventually fix the UB conversions. It should change no behaviour. It's ready for review and merging. |
Modified READ_DATA macro to: - know both source and destination type - provide a function to convert between types For now the conversion function just casts, which is what the macro did before. In other words, this commit should not change any behaviour at all. It only adds infrastructure. Subsequently we can carefully implement the conversion functions to not invoke undefined behaviour when converting, for example, large ints to small ints.
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.