Skip to content

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

Merged
merged 28 commits into from
Jan 17, 2023

Conversation

peterschrammel
Copy link
Member

Tests only, marked FUTURE.

  • Each commit message has a non-empty body, explaining why the change was made.
  • [n/a] Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • [n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • [n/a] My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • [n/a] White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@peterschrammel peterschrammel force-pushed the shadow-memory-tests branch 2 times, most recently from f175a6c to 90faa39 Compare January 15, 2023 16:30
@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Base: 78.48% // Head: 78.48% // No change to project coverage 👍

Coverage data is based on head (2a78b3d) compared to base (5cabd3b).
Patch has no changes to coverable lines.

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@peterschrammel peterschrammel marked this pull request as ready for review January 15, 2023 20:59
@peterschrammel peterschrammel requested review from esteffin and a team January 15, 2023 20:59
Copy link
Collaborator

@tautschnig tautschnig left a 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?

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.
@peterschrammel peterschrammel merged commit 72fb131 into diffblue:develop Jan 17, 2023
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

Successfully merging this pull request may close these issues.

2 participants