-
Notifications
You must be signed in to change notification settings - Fork 274
Tests for future shadow memory feature #7479
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
Tests for future shadow memory feature #7479
Conversation
f175a6c
to
90faa39
Compare
Codecov ReportBase: 78.48% // Head: 78.48% // No change to project coverage 👍
Additional details and impacted files@@ Coverage Diff @@
## develop #7479 +/- ##
========================================
Coverage 78.48% 78.48%
========================================
Files 1663 1663
Lines 191188 191188
========================================
Hits 150054 150054
Misses 41134 41134 Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
90faa39
to
a3db5c6
Compare
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.
Can you please also add them to regression/CMakeLists.txt
?
a3db5c6
to
312305c
Compare
An example from the paper CBMC-SSM: Bounded Model Checking of C Programs with Symbolic Shadow Memory. Bernd Fischer, Salvatore La Torre, Gennaro Parlato, Peter Schrammel. ASE'22.
More or less systematically test shadow memory for various data structure combinations.
More or less systematically test shadow memory for various data structure combinations.
Static memory requires a declaration for global fields.
Dynamic memory requires a declaration for global fields.
Test potential adverse interaction with string constants in value sets.
Test that we can attach integer-valued shadow memory to floats.
Checks that variable shadow memory values are handled correctly.
More or less systematically checks that byte-based accesses into shadow memory of nested structs and arrays work correctly.
More or less systematically tests that access to aggregates of integer-valued shadow memory returns the maximum of the shadow memory value of its constituting bytes.
More or less systematically tests that access to aggregates of bool-valued shadow memory returns the logic OR of the shadow memory value of its constituting bytes.
More or less systematically checks that byte-based shadow memory access to unions works correctly.
Checks that multi-byte accesses to integer-valued shadow memory for unions returns the maximum of the constituting bytes.
Checks that multi-byte accesses to integer-valued shadow memory for unions returns the logical OR of the constituting bytes.
Const char * parameters and pointers into string constants.
Checks that variables-sized arrrays are handled correctly.
Test initialization of various data types with custom values
Shadow memory mirrors pass-by-value and pass-by-reference semantics. Value parameters have their own shadow memory instances.
Checks that accessing shadow memory through void pointers returns the expected error messages, unless the correct casts have been applied.
Checks that shadow memory accesses are not confused by potentially nondeterministic accesses into structs.
Checks that a shadow memory accesses are not confused by potential accesses through NULL pointers.
Test deterministic and nondeterministic pointers to elements.
We must be able to attach shadow memory to the memory returned by __errno().
We must be able to attach memory to the memory returned by getenv().
Checks that the shadow memories of source and destination bufferes are independent.
Check that source and destination buffers have independent shadow memory.
Shadow memory assignments appear in trace.
The --no-shadow-memory-matching option will allow to avoid the allocation of shadow memory for matching variables.
312305c
to
2a78b3d
Compare
Tests only, marked FUTURE.