Skip to content
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

MRA Region Injection Bugs #299

Open
l-kent opened this issue Jan 16, 2025 · 1 comment
Open

MRA Region Injection Bugs #299

l-kent opened this issue Jan 16, 2025 · 1 comment

Comments

@l-kent
Copy link
Contributor

l-kent commented Jan 16, 2025

MRAMemoryRegionSystemTestsGTIRB still fails for the test correct/initialisation/gcc:GTIRB and MRAMemoryRegionSystemTestsBAP still fails for the tests correct/initialisation/gcc:BAP and correct/initialisation/clang_O2:BAP.

These tests fail because of issues with reconciling the size of an array a in the symbol table with the smaller array accesses that actually occur in the program. The array a is an array of two 32-bit/4-byte values. The symbol table lists it as 64-bit, but each access to a[0] or a[1] in the program is a 32-bit access to either the address of a or a + 4 and this is not handled properly, as the smaller accesses are overridden by the larger size in the symbol table. This causes inconsistencies between the GRA results and the DataRegions in the MMM, leading to incorrect regions created in the Boogie output. This is quite difficult to untangle at the moment.

There are further difficulties as the GRA and MRA use 1 byte as the default size of a DataRegion, including as a placeholder that is later overridden, but this is also a valid access size for 1 byte accesses.

@l-kent
Copy link
Contributor Author

l-kent commented Jan 30, 2025

There is additionally some sort of non-determinism issue with these tests.

When running testOnly MRAMemoryRegionSystemTestsBAP -- -z correct/initialisationMRAMemoryRegionSystemTestsBAP and testOnly MRAMemoryRegionSystemTestsBAP -- -z correct/initialisationMRAMemoryRegionSystemTestsGTIRB, the number of tests that succeed is random.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant