|
GCC Middle and Back End API Reference
|
#include <store.h>

Public Types | |
| typedef hash_set< constsymbolic::value_node * >::iterator | iterator |
Public Member Functions | |
| void | on_maybe_bound_value (const symbolic::value_node &val) |
| void | on_mutable_value_at_unknown_call (const symbolic::value_node &val) |
| bool | unknown_sm_state_p (const svalue *sval) |
| void | add_bit_contents (const symbolic::bit_contents &bc) |
| void | dump () const |
| void | dump_to_logger (logger &) const |
| std::unique_ptr< text_art::tree_widget > | make_dump_widget (symbolic::node_dump_state &nds) const |
| iterator | begin_maybe_bound_svals () const |
| iterator | end_maybe_bound_svals () const |
Private Attributes | |
| hash_set< const symbolic::value_node * > | m_maybe_bound_vals |
| hash_set< const symbolic::value_node * > | m_mutable_at_unknown_call_vals |
A class for keeping track of aspects of a program_state that we don't know about, to avoid false positives about leaks. Consider: p->field = malloc (1024); q->field = NULL; where we don't know whether or not p and q point to the same memory, and: p->field = malloc (1024); unknown_fn (p); In both cases, the svalue for the address of the allocated buffer goes from being bound to p->field to not having anything explicitly bound to it. Given that we conservatively discard bindings due to possible aliasing or calls to unknown function, the store loses references to svalues, but these svalues could still be live. We don't want to warn about them leaking - they're effectively in a "maybe live" state. This "maybe live" information is somewhat transient. We don't want to store this "maybe live" information in the program_state, region_model, or store, since we don't want to bloat these objects (and potentially bloat the exploded_graph with more nodes). However, we can't store it in the region_model_context, as these context objects sometimes don't last long enough to be around when comparing the old vs the new state. This class is a way to track a set of such svalues, so that we can temporarily capture that they are in a "maybe live" state whilst comparing old and new states.
| typedef hash_set<constsymbolic::value_node*>::iterator ana::uncertainty_t::iterator |
| void ana::uncertainty_t::add_bit_contents | ( | const symbolic::bit_contents & | bc | ) |
|
inline |
References m_maybe_bound_vals.
| void ana::uncertainty_t::dump | ( | ) | const |
| void ana::uncertainty_t::dump_to_logger | ( | logger & | ) | const |
|
inline |
References m_maybe_bound_vals.
| std::unique_ptr< text_art::tree_widget > ana::uncertainty_t::make_dump_widget | ( | symbolic::node_dump_state & | nds | ) | const |
| void ana::uncertainty_t::on_maybe_bound_value | ( | const symbolic::value_node & | val | ) |
| void ana::uncertainty_t::on_mutable_value_at_unknown_call | ( | const symbolic::value_node & | val | ) |
|
private |
Referenced by begin_maybe_bound_svals(), and end_maybe_bound_svals().
|
private |