-
Notifications
You must be signed in to change notification settings - Fork 264
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
Commits on Aug 23, 2023
-
Fix 32bit unit test build failure
GCC defines i386 as a macro (with value 1) on 32-bit x86.
Configuration menu - View commit details
-
Copy full SHA for 24d4d3a - Browse repository at this point
Copy the full SHA 24d4d3aView commit details -
Unit tests: do not hard-code 64-bit pointer width
We also support 32-bit architectures.
Configuration menu - View commit details
-
Copy full SHA for 37ed69c - Browse repository at this point
Copy the full SHA 37ed69cView commit details -
Interpreter: Do not hard-code platform bit width
Not all systems have 64-bit addresses. Also fix an off-by-power-of-2 error in the comment.
Configuration menu - View commit details
-
Copy full SHA for caca58b - Browse repository at this point
Copy the full SHA caca58bView commit details -
Make goto-inspect test patterns platform-agnostic
Not all platforms have 32-bit int, and the size of long int may be the same as int.
Configuration menu - View commit details
-
Copy full SHA for 093e2f3 - Browse repository at this point
Copy the full SHA 093e2f3View commit details -
Test patterns: fix optional casts
Not all platforms require casts from int to long int as those may have the same bit width.
Configuration menu - View commit details
-
Copy full SHA for 352299a - Browse repository at this point
Copy the full SHA 352299aView commit details -
goto-harness regression tests: support non-64-bit platforms
The pointer width encoded in pre-built snapshots is 64 bits. Replace that width at test runtime with the host system bit width.
Configuration menu - View commit details
-
Copy full SHA for 3318f6f - Browse repository at this point
Copy the full SHA 3318f6fView commit details -
Fix tests and argc/argv constraints to account for the fact that our arrays (at present) use signed sizes. We previously didn't always consider the case that where sizeof(int) == sizeof(long), which demonstrated overflows.
Configuration menu - View commit details
-
Copy full SHA for ebaf09f - Browse repository at this point
Copy the full SHA ebaf09fView commit details -
Fix tests and contracts wrongly assuming sizeof(long) == sizeof(long …
…long) This isn't true for all platforms.
Configuration menu - View commit details
-
Copy full SHA for a9ca74e - Browse repository at this point
Copy the full SHA a9ca74eView commit details -
Tests: use types that are smaller than long on all platforms
Some tests assumed that sizeof(int) < sizeof(long), which need not be the case.
Configuration menu - View commit details
-
Copy full SHA for 0723271 - Browse repository at this point
Copy the full SHA 0723271View commit details -
Tests: do not hard-code 64 bits/8 bytes as pointer width
This wouldn't be true for all platforms.
Configuration menu - View commit details
-
Copy full SHA for ba7eb04 - Browse repository at this point
Copy the full SHA ba7eb04View commit details -
The comparison previously succeeded by chance on 64-bit platforms, but didn't pass on ones that have a smaller pointer width.
Configuration menu - View commit details
-
Copy full SHA for a3f1ae9 - Browse repository at this point
Copy the full SHA a3f1ae9View commit details -
Properly type initial value of __CPROVER_max_malloc_size
Use a suffix to ensure the constant isn't treated as an int, but instead matches the left-hand side's type.
Configuration menu - View commit details
-
Copy full SHA for 28e4238 - Browse repository at this point
Copy the full SHA 28e4238View commit details -
Goto analyzer: do not create untyped nil expression
We need to create a typed variant of top rather than relying on eval to produce a typed expression. Tests involving pointer difference spuriously passed for 64-bit platforms include a type cast in those expressions. The abstract evaluation of said type cast resulted in typed expressions despite the untyped nil input.
Configuration menu - View commit details
-
Copy full SHA for 5eb8a94 - Browse repository at this point
Copy the full SHA 5eb8a94View commit details -
Make cbmc-incr-smt2 test patterns platform-agnostic
Not all platforms have 32-bit int, and the size of long int may be the same as int.
Configuration menu - View commit details
-
Copy full SHA for cc27808 - Browse repository at this point
Copy the full SHA cc27808View commit details -
cbmc-incr-smt2 tests: remove misguided assertion
There is no reason an integer couldn't have the same value as a pointer (when converted to an integer type). This assertion might accidentally hold on platforms where sizeof(int) != sizeof(int *) given our current pointer model, but this is an implementation detail that we must not rely on. The assertion certainly doesn't hold when sizeof(int) == sizeof(int *).
Configuration menu - View commit details
-
Copy full SHA for 9d1be21 - Browse repository at this point
Copy the full SHA 9d1be21View commit details -
Incremental SMT2: support cast from pointer to integer of different w…
…idth Do a zero extension, just like the propositional back-end does.
Configuration menu - View commit details
-
Copy full SHA for 0794f5b - Browse repository at this point
Copy the full SHA 0794f5bView commit details -
Make memory-analyzer compatible with i386
We previously hard-coded x86_64 calling conventions for malloc.
Configuration menu - View commit details
-
Copy full SHA for c1f9237 - Browse repository at this point
Copy the full SHA c1f9237View commit details -
Contracts test: ensure return value access is in bounds
We ended up with an assumption that performed an out-of-bounds access as there was no link between `size` and the return value in the contract.
Configuration menu - View commit details
-
Copy full SHA for 1cae1b3 - Browse repository at this point
Copy the full SHA 1cae1b3View commit details -
Run 32-bit builds and tests as CI job
This is to detect hardwired 64-bit configuration or tests when those should be platform-independent instead.
Configuration menu - View commit details
-
Copy full SHA for 1a30ad4 - Browse repository at this point
Copy the full SHA 1a30ad4View commit details