-
Notifications
You must be signed in to change notification settings - Fork 269
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
Test 32-bit builds in CI and fix platform-specific code and tests #7756
Merged
Merged
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
24d4d3a
Fix 32bit unit test build failure
tautschnig 37ed69c
Unit tests: do not hard-code 64-bit pointer width
tautschnig caca58b
Interpreter: Do not hard-code platform bit width
tautschnig 093e2f3
Make goto-inspect test patterns platform-agnostic
tautschnig 352299a
Test patterns: fix optional casts
tautschnig 3318f6f
goto-harness regression tests: support non-64-bit platforms
tautschnig ebaf09f
Arrays have a signed size
tautschnig a9ca74e
Fix tests and contracts wrongly assuming sizeof(long) == sizeof(long …
tautschnig 0723271
Tests: use types that are smaller than long on all platforms
tautschnig ba7eb04
Tests: do not hard-code 64 bits/8 bytes as pointer width
tautschnig a3f1ae9
Tests: fix index typo
tautschnig 28e4238
Properly type initial value of __CPROVER_max_malloc_size
tautschnig 5eb8a94
Goto analyzer: do not create untyped nil expression
tautschnig cc27808
Make cbmc-incr-smt2 test patterns platform-agnostic
tautschnig 9d1be21
cbmc-incr-smt2 tests: remove misguided assertion
tautschnig 0794f5b
Incremental SMT2: support cast from pointer to integer of different w…
tautschnig c1f9237
Make memory-analyzer compatible with i386
tautschnig 1cae1b3
Contracts test: ensure return value access is in bounds
tautschnig 1a30ad4
Run 32-bit builds and tests as CI job
tautschnig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My apologies for nitpicking something which is already merged, but how does swapping from
void_type()
toempty_typet{}
fix a 32-bit build problem? Thevoid_type()
function just returns an instance ofempty_typet{}
, and neither of these depend on a bit width, as far as I can see.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, yes, that indeed wasn't a complete fix: it was my attempt to get rid of
util/c_types.h
, for many of the types in there are by definition platform-dependent. But turns out that fully removing that include is impossible, because there also is use ofc_bool_typet
andc_enum_typet
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, so I could effectively think of this as a front-end de-coupling effort. There are many C front end specific types in the unit tests for the new SMT decision procedure because the decision procedure needs to implement support for them specifically. This is the case because these data structures find thier way all the way through cbmc to the decision procedure rather than being lowered to some kind of goto construct at the end of the processing of the front end. Another one for the list is
union_typet
which is defined inutil/c_types.h
, but which is sent to the decision procedure.Whilst the decision procedure needs front-end specific functionality I would prefer to keep matching front-end specific types in the unit tests. That way we can remove the front end specifics from the decision procedure and the unit tests if and when we ever sufficiently decouple to stop them getting to the decision procedure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I entirely agree with your assessment. One day we should come clean on this and decide whether the types you mentioned are to be considered fundamental types, and therefore, should be moved out of
c_types.h
, or be lowered and not be ones to handle in back-ends.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So, yes, my change in this file wasn't actually necessary, but probably doesn't need to be reverted either?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it was somewhat easier to read as a void pointer, rather than an empty pointer. However I also don't think it is worth taking the time to revert. I questioned it as it didn't appear to match the commit message concerning 32 bit support, so I didn't initially understand why the change had been made. Thank you for taking the time to respond.