Cast ints on read instead of write in base analysis#128
Merged
Conversation
This compensates for the removed int cast on write. It is also consistent with existing Mem behavior which does this cast.
Without this the implicit function declaration for malloc has int return type, causing an unintended imprecise cast.
Member
Author
|
I did another SV-COMP SoftwareSystems run on the commit exactly before this PR for comparison. The differences are:
So SV-COMP-wise this doesn't change much, a few benchmarks this way or that way. Therefore I don't feel too strongly about merging this for SV-COMP but it's related to issues we'd still want to have fixed. |
Member
|
My intuition would be merging this for |
Merged
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.
This is an experimental attempt towards fixing #119.
The only reason types are required in
VD.update_offsetis to cast ints to appropriate types when written to through pointers which have been cast to a different type. This moves that cast from write time to later read time. Thus eliminating the need for having (problematic) type info available when writing.This cast in the
Varcase is actually consistent with the already existing cast in theMemcase.The bigger impact of this simple change is unknown. It could also be problematic for #121.
TODO
VD.update_offset.