-
Notifications
You must be signed in to change notification settings - Fork 263
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
Shadow memory initialization functions #7836
Shadow memory initialization functions #7836
Conversation
5dd8480
to
3bf8f24
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #7836 +/- ##
=========================================
Coverage 78.79% 78.80%
=========================================
Files 1698 1698
Lines 194641 194745 +104
=========================================
+ Hits 153374 153467 +93
- Misses 41267 41278 +11
☔ View full report in Codecov by Sentry. |
symbol.is_auxiliary) || | ||
!symbol.is_static_lifetime) | ||
return; | ||
if(id2string(symbol.name).find("__cs_") != std::string::npos) |
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.
This case needs to be handled by some future filter option. I'd remove it for now.
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.
We added a TODO
comment saying that the filtering will be done when the last functionalities are added, so we will have more confidence that we are not adding regressions.
{ | ||
return; | ||
} | ||
if(symbol_name.find("__cs_") != std::string::npos) |
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.
Same here (filter option).
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.
As above
symbol_name.find("::return_value") == std::string::npos) | ||
return; | ||
if( | ||
symbol_name.find("malloc::") != std::string::npos && |
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.
These filters should be made more precise.
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.
As above
3bf8f24
to
8f57405
Compare
Clean the given pointer expression so that it has the right shape for being used for identifying shadow memory. This handles some quirks regarding array sizes containing L2 symbols and string constants not having char-pointer type.
Allocates shadows for a given original memory for each declared field. The shadows are registered in the shadow_memory_state (part of goto_symex_statet to consider scoping of local shadows). In the next step this functionality is used to allocate shadow memory for the original memory allocations encountered when symexing a goto model.
This commit adds the implementation to the 4 shadow memory user-facing initialization functions. Namely: - shadow_memoryt::symex_field_static_init - shadow_memoryt::symex_field_static_init_string_constant - shadow_memoryt::symex_field_local_init - shadow_memoryt::symex_field_dynamic_init
8f57405
to
4f5df20
Compare
PR adding implementation for the Shadow memory initialization functions.
Unit tests will be added when the remaining components will be added.