bv_typet is also sensitive to endianness#6485
Merged
tautschnig merged 1 commit intodiffblue:developfrom Nov 29, 2021
Merged
Conversation
peterschrammel
approved these changes
Nov 29, 2021
Member
peterschrammel
left a comment
There was a problem hiding this comment.
Have you got a test case that exhibited this problem?
Collaborator
Author
Codecov Report
@@ Coverage Diff @@
## develop #6485 +/- ##
========================================
Coverage 76.04% 76.04%
========================================
Files 1546 1546
Lines 165485 165521 +36
========================================
+ Hits 125836 125864 +28
- Misses 39649 39657 +8
Continue to review full report at Codecov.
|
The bits within an object of bv_typet are ordered depending on endianness. This is consistent with typecasts to/from bv_typet of some other bitvector type, which do not alter the sequence of bits. The unit test would previously fail the check `REQUIRE(lower_be1 == *array_of_bits)` for the big-endian case (line 89), even though the little-endian case was fine.
e56a9e6 to
5bf69a3
Compare
Collaborator
Author
Test added and commit message amended to explain what was failing before. |
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.
The bits within an object of bv_typet are ordered depending on
endianness. This is consistent with typecasts to/from bv_typet of some
other bitvector type, which do not alter the sequence of bits.