GCC Middle and Back End API Reference
ana::region_model Class Reference

#include <region-model.h>

Collaboration diagram for ana::region_model:

Public Types

typedef region_to_value_map dynamic_extents_t
 

Public Member Functions

 region_model (region_model_manager *mgr)
 
 region_model (const region_model &other)
 
 ~region_model ()
 
region_modeloperator= (const region_model &other)
 
bool operator== (const region_model &other) const
 
bool operator!= (const region_model &other) const
 
hashval_t hash () const
 
void print (pretty_printer *pp) const
 
void dump_to_pp (pretty_printer *pp, bool simple, bool multiline) const
 
void dump (FILE *fp, bool simple, bool multiline) const
 
void dump (bool simple) const
 
void debug () const
 
json::objectto_json () const
 
void validate () const
 
void canonicalize ()
 
bool canonicalized_p () const
 
void on_stmt_pre (const gimple *stmt, bool *out_unknown_side_effects, region_model_context *ctxt)
 
void on_assignment (const gassign *stmt, region_model_context *ctxt)
 
const svalueget_gassign_result (const gassign *assign, region_model_context *ctxt)
 
void on_asm_stmt (const gasm *asm_stmt, region_model_context *ctxt)
 
bool on_call_pre (const gcall *stmt, region_model_context *ctxt)
 
void on_call_post (const gcall *stmt, bool unknown_side_effects, region_model_context *ctxt)
 
void purge_state_involving (const svalue *sval, region_model_context *ctxt)
 
void impl_deallocation_call (const call_details &cd)
 
const svaluemaybe_get_copy_bounds (const region *src_reg, const svalue *num_bytes_sval)
 
void update_for_int_cst_return (const call_details &cd, int retval, bool unmergeable)
 
void update_for_zero_return (const call_details &cd, bool unmergeable)
 
void update_for_nonzero_return (const call_details &cd)
 
void handle_unrecognized_call (const gcall *call, region_model_context *ctxt)
 
void get_reachable_svalues (svalue_set *out, const svalue *extra_sval, const uncertainty_t *uncertainty)
 
void on_return (const greturn *stmt, region_model_context *ctxt)
 
void on_setjmp (const gcall *stmt, const exploded_node *enode, region_model_context *ctxt)
 
void on_longjmp (const gcall *longjmp_call, const gcall *setjmp_call, int setjmp_stack_depth, region_model_context *ctxt)
 
void update_for_phis (const supernode *snode, const cfg_superedge *last_cfg_superedge, region_model_context *ctxt)
 
void handle_phi (const gphi *phi, tree lhs, tree rhs, const region_model &old_state, hash_set< const svalue * > &svals_changing_meaning, region_model_context *ctxt)
 
bool maybe_update_for_edge (const superedge &edge, const gimple *last_stmt, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out)
 
void update_for_gcall (const gcall *call_stmt, region_model_context *ctxt, function *callee=NULL)
 
void update_for_return_gcall (const gcall *call_stmt, region_model_context *ctxt)
 
const regionpush_frame (const function &fun, const vec< const svalue * > *arg_sids, region_model_context *ctxt)
 
const frame_regionget_current_frame () const
 
const functionget_current_function () const
 
void pop_frame (tree result_lvalue, const svalue **out_result, region_model_context *ctxt, bool eval_return_svalue=true)
 
int get_stack_depth () const
 
const frame_regionget_frame_at_index (int index) const
 
const regionget_lvalue (path_var pv, region_model_context *ctxt) const
 
const regionget_lvalue (tree expr, region_model_context *ctxt) const
 
const svalueget_rvalue (path_var pv, region_model_context *ctxt) const
 
const svalueget_rvalue (tree expr, region_model_context *ctxt) const
 
const regionderef_rvalue (const svalue *ptr_sval, tree ptr_tree, region_model_context *ctxt, bool add_nonnull_constraint=true) const
 
const svalueget_rvalue_for_bits (tree type, const region *reg, const bit_range &bits, region_model_context *ctxt) const
 
void set_value (const region *lhs_reg, const svalue *rhs_sval, region_model_context *ctxt)
 
void set_value (tree lhs, tree rhs, region_model_context *ctxt)
 
void clobber_region (const region *reg)
 
void purge_region (const region *reg)
 
void fill_region (const region *reg, const svalue *sval, region_model_context *ctxt)
 
void zero_fill_region (const region *reg, region_model_context *ctxt)
 
void write_bytes (const region *dest_reg, const svalue *num_bytes_sval, const svalue *sval, region_model_context *ctxt)
 
const svalueread_bytes (const region *src_reg, tree src_ptr_expr, const svalue *num_bytes_sval, region_model_context *ctxt) const
 
void copy_bytes (const region *dest_reg, const region *src_reg, tree src_ptr_expr, const svalue *num_bytes_sval, region_model_context *ctxt)
 
void mark_region_as_unknown (const region *reg, uncertainty_t *uncertainty)
 
tristate eval_condition (const svalue *lhs, enum tree_code op, const svalue *rhs) const
 
tristate compare_initial_and_pointer (const initial_svalue *init, const region_svalue *ptr) const
 
tristate symbolic_greater_than (const binop_svalue *a, const svalue *b) const
 
tristate structural_equality (const svalue *a, const svalue *b) const
 
tristate eval_condition (tree lhs, enum tree_code op, tree rhs, region_model_context *ctxt) const
 
bool add_constraint (tree lhs, enum tree_code op, tree rhs, region_model_context *ctxt)
 
bool add_constraint (tree lhs, enum tree_code op, tree rhs, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out)
 
const regionget_or_create_region_for_heap_alloc (const svalue *size_in_bytes, region_model_context *ctxt, bool update_state_machine=false, const call_details *cd=nullptr)
 
const regioncreate_region_for_alloca (const svalue *size_in_bytes, region_model_context *ctxt)
 
void get_referenced_base_regions (auto_bitmap &out_ids) const
 
tree get_representative_tree (const svalue *sval) const
 
tree get_representative_tree (const region *reg) const
 
path_var get_representative_path_var (const svalue *sval, svalue_set *visited) const
 
path_var get_representative_path_var (const region *reg, svalue_set *visited) const
 
constraint_managerget_constraints ()
 
storeget_store ()
 
const storeget_store () const
 
const dynamic_extents_tget_dynamic_extents () const
 
const svalueget_dynamic_extents (const region *reg) const
 
void set_dynamic_extents (const region *reg, const svalue *size_in_bytes, region_model_context *ctxt)
 
void unset_dynamic_extents (const region *reg)
 
region_model_managerget_manager () const
 
bounded_ranges_managerget_range_manager () const
 
void unbind_region_and_descendents (const region *reg, enum poison_kind pkind)
 
bool can_merge_with_p (const region_model &other_model, const program_point &point, region_model *out_model, const extrinsic_state *ext_state=NULL, const program_state *state_a=NULL, const program_state *state_b=NULL) const
 
tree get_fndecl_for_call (const gcall *call, region_model_context *ctxt)
 
void get_regions_for_current_frame (auto_vec< const decl_region * > *out) const
 
const svalueget_store_value (const region *reg, region_model_context *ctxt) const
 
const svalueget_store_bytes (const region *base_reg, const byte_range &bytes, region_model_context *ctxt) const
 
const svaluescan_for_null_terminator (const region *reg, tree expr, const svalue **out_sval, region_model_context *ctxt) const
 
const svaluescan_for_null_terminator_1 (const region *reg, tree expr, const svalue **out_sval, region_model_context *ctxt) const
 
bool region_exists_p (const region *reg) const
 
void loop_replay_fixup (const region_model *dst_state)
 
const svalueget_capacity (const region *reg) const
 
bool replay_call_summary (call_summary_replay &r, const region_model &summary)
 
void maybe_complain_about_infoleak (const region *dst_reg, const svalue *copied_sval, const region *src_reg, region_model_context *ctxt)
 
void set_errno (const call_details &cd)
 
void mark_as_valid_fd (const svalue *sval, region_model_context *ctxt)
 
void on_realloc_with_move (const call_details &cd, const svalue *old_ptr_sval, const svalue *new_ptr_sval)
 
void transition_ptr_sval_non_null (region_model_context *ctxt, const svalue *new_ptr_sval)
 
void mark_as_tainted (const svalue *sval, region_model_context *ctxt)
 
bool add_constraint (const svalue *lhs, enum tree_code op, const svalue *rhs, region_model_context *ctxt)
 
const svaluecheck_for_poison (const svalue *sval, tree expr, const region *src_region, region_model_context *ctxt) const
 
void check_region_for_write (const region *dest_reg, const svalue *sval_hint, region_model_context *ctxt) const
 
const svaluecheck_for_null_terminated_string_arg (const call_details &cd, unsigned idx) const
 
const svaluecheck_for_null_terminated_string_arg (const call_details &cd, unsigned idx, bool include_terminator, const svalue **out_sval) const
 
const builtin_known_functionget_builtin_kf (const gcall *call, region_model_context *ctxt=NULL) const
 
bool called_from_main_p () const
 

Static Public Member Functions

static void append_regions_cb (const region *base_reg, struct append_regions_cb_data *data)
 
static void register_pop_frame_callback (const pop_frame_callback &callback)
 
static void notify_on_pop_frame (const region_model *model, const region_model *prev_model, const svalue *retval, region_model_context *ctxt)
 

Private Member Functions

const regionget_lvalue_1 (path_var pv, region_model_context *ctxt) const
 
const svalueget_rvalue_1 (path_var pv, region_model_context *ctxt) const
 
path_var get_representative_path_var_1 (const svalue *sval, svalue_set *visited) const
 
path_var get_representative_path_var_1 (const region *reg, svalue_set *visited) const
 
const known_functionget_known_function (tree fndecl, const call_details &cd) const
 
const known_functionget_known_function (enum internal_fn) const
 
bool add_constraints_from_binop (const svalue *outer_lhs, enum tree_code outer_op, const svalue *outer_rhs, bool *out, region_model_context *ctxt)
 
void update_for_call_superedge (const call_superedge &call_edge, region_model_context *ctxt)
 
void update_for_return_superedge (const return_superedge &return_edge, region_model_context *ctxt)
 
bool apply_constraints_for_gcond (const cfg_superedge &edge, const gcond *cond_stmt, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out)
 
bool apply_constraints_for_gswitch (const switch_cfg_superedge &edge, const gswitch *switch_stmt, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out)
 
bool apply_constraints_for_ggoto (const cfg_superedge &edge, const ggoto *goto_stmt, region_model_context *ctxt)
 
bool apply_constraints_for_exception (const gimple *last_stmt, region_model_context *ctxt, std::unique_ptr< rejected_constraint > *out)
 
int poison_any_pointers_to_descendents (const region *reg, enum poison_kind pkind)
 
void on_top_level_param (tree param, bool nonnull, region_model_context *ctxt)
 
const svalueget_initial_value_for_global (const region *reg) const
 
const regionget_region_for_poisoned_expr (tree expr) const
 
void check_dynamic_size_for_taint (enum memory_space mem_space, const svalue *size_in_bytes, region_model_context *ctxt) const
 
void check_dynamic_size_for_floats (const svalue *size_in_bytes, region_model_context *ctxt) const
 
void check_region_for_taint (const region *reg, enum access_direction dir, region_model_context *ctxt) const
 
void check_for_writable_region (const region *dest_reg, region_model_context *ctxt) const
 
bool check_region_access (const region *reg, enum access_direction dir, const svalue *sval_hint, region_model_context *ctxt) const
 
bool check_region_for_read (const region *src_reg, region_model_context *ctxt) const
 
void check_region_size (const region *lhs_reg, const svalue *rhs_sval, region_model_context *ctxt) const
 
bool check_symbolic_bounds (const region *base_reg, const svalue *sym_byte_offset, const svalue *num_bytes_sval, const svalue *capacity, enum access_direction dir, const svalue *sval_hint, region_model_context *ctxt) const
 
bool check_region_bounds (const region *reg, enum access_direction dir, const svalue *sval_hint, region_model_context *ctxt) const
 
void check_call_args (const call_details &cd) const
 
void check_call_format_attr (const call_details &cd, tree format_attr) const
 
void check_function_attr_access (const gcall *call, tree callee_fndecl, region_model_context *ctxt, rdwr_map &rdwr_idx) const
 
void check_function_attr_null_terminated_string_arg (const gcall *call, tree callee_fndecl, region_model_context *ctxt, rdwr_map &rdwr_idx)
 
void check_one_function_attr_null_terminated_string_arg (const gcall *call, tree callee_fndecl, region_model_context *ctxt, rdwr_map &rdwr_idx, tree attr)
 
void check_function_attrs (const gcall *call, tree callee_fndecl, region_model_context *ctxt)
 

Private Attributes

region_model_manager *const m_mgr
 
store m_store
 
constraint_managerm_constraints
 
const frame_regionm_current_frame
 
dynamic_extents_t m_dynamic_extents
 

Static Private Attributes

static auto_vec< pop_frame_callbackpop_frame_callbacks
 

Detailed Description

A region_model encapsulates a representation of the state of memory, with
a tree of regions, along with their associated values.
The representation is graph-like because values can be pointers to
regions.
It also stores:
- a constraint_manager, capturing relationships between the values, and
- dynamic extents, mapping dynamically-allocated regions to svalues (their
capacities).   

Member Typedef Documentation

◆ dynamic_extents_t

Constructor & Destructor Documentation

◆ region_model() [1/2]

ana::region_model::region_model ( region_model_manager * mgr)

◆ region_model() [2/2]

ana::region_model::region_model ( const region_model & other)

◆ ~region_model()

ana::region_model::~region_model ( )

Member Function Documentation

◆ add_constraint() [1/3]

bool ana::region_model::add_constraint ( const svalue * lhs,
enum tree_code op,
const svalue * rhs,
region_model_context * ctxt )

◆ add_constraint() [2/3]

bool ana::region_model::add_constraint ( tree lhs,
enum tree_code op,
tree rhs,
region_model_context * ctxt )

◆ add_constraint() [3/3]

bool ana::region_model::add_constraint ( tree lhs,
enum tree_code op,
tree rhs,
region_model_context * ctxt,
std::unique_ptr< rejected_constraint > * out )

◆ add_constraints_from_binop()

bool ana::region_model::add_constraints_from_binop ( const svalue * outer_lhs,
enum tree_code outer_op,
const svalue * outer_rhs,
bool * out,
region_model_context * ctxt )
private

◆ append_regions_cb()

static void ana::region_model::append_regions_cb ( const region * base_reg,
struct append_regions_cb_data * data )
static

◆ apply_constraints_for_exception()

bool ana::region_model::apply_constraints_for_exception ( const gimple * last_stmt,
region_model_context * ctxt,
std::unique_ptr< rejected_constraint > * out )
private

◆ apply_constraints_for_gcond()

bool ana::region_model::apply_constraints_for_gcond ( const cfg_superedge & edge,
const gcond * cond_stmt,
region_model_context * ctxt,
std::unique_ptr< rejected_constraint > * out )
private

◆ apply_constraints_for_ggoto()

bool ana::region_model::apply_constraints_for_ggoto ( const cfg_superedge & edge,
const ggoto * goto_stmt,
region_model_context * ctxt )
private

◆ apply_constraints_for_gswitch()

bool ana::region_model::apply_constraints_for_gswitch ( const switch_cfg_superedge & edge,
const gswitch * switch_stmt,
region_model_context * ctxt,
std::unique_ptr< rejected_constraint > * out )
private

◆ called_from_main_p()

bool ana::region_model::called_from_main_p ( ) const

◆ can_merge_with_p()

bool ana::region_model::can_merge_with_p ( const region_model & other_model,
const program_point & point,
region_model * out_model,
const extrinsic_state * ext_state = NULL,
const program_state * state_a = NULL,
const program_state * state_b = NULL ) const

◆ canonicalize()

void ana::region_model::canonicalize ( )

◆ canonicalized_p()

bool ana::region_model::canonicalized_p ( ) const

◆ check_call_args()

void ana::region_model::check_call_args ( const call_details & cd) const
private

◆ check_call_format_attr()

void ana::region_model::check_call_format_attr ( const call_details & cd,
tree format_attr ) const
private

◆ check_dynamic_size_for_floats()

void ana::region_model::check_dynamic_size_for_floats ( const svalue * size_in_bytes,
region_model_context * ctxt ) const
private

◆ check_dynamic_size_for_taint()

void ana::region_model::check_dynamic_size_for_taint ( enum memory_space mem_space,
const svalue * size_in_bytes,
region_model_context * ctxt ) const
private

◆ check_for_null_terminated_string_arg() [1/2]

const svalue * ana::region_model::check_for_null_terminated_string_arg ( const call_details & cd,
unsigned idx ) const

◆ check_for_null_terminated_string_arg() [2/2]

const svalue * ana::region_model::check_for_null_terminated_string_arg ( const call_details & cd,
unsigned idx,
bool include_terminator,
const svalue ** out_sval ) const

◆ check_for_poison()

const svalue * ana::region_model::check_for_poison ( const svalue * sval,
tree expr,
const region * src_region,
region_model_context * ctxt ) const

◆ check_for_writable_region()

void ana::region_model::check_for_writable_region ( const region * dest_reg,
region_model_context * ctxt ) const
private

◆ check_function_attr_access()

void ana::region_model::check_function_attr_access ( const gcall * call,
tree callee_fndecl,
region_model_context * ctxt,
rdwr_map & rdwr_idx ) const
private

◆ check_function_attr_null_terminated_string_arg()

void ana::region_model::check_function_attr_null_terminated_string_arg ( const gcall * call,
tree callee_fndecl,
region_model_context * ctxt,
rdwr_map & rdwr_idx )
private

◆ check_function_attrs()

void ana::region_model::check_function_attrs ( const gcall * call,
tree callee_fndecl,
region_model_context * ctxt )
private

◆ check_one_function_attr_null_terminated_string_arg()

void ana::region_model::check_one_function_attr_null_terminated_string_arg ( const gcall * call,
tree callee_fndecl,
region_model_context * ctxt,
rdwr_map & rdwr_idx,
tree attr )
private

◆ check_region_access()

bool ana::region_model::check_region_access ( const region * reg,
enum access_direction dir,
const svalue * sval_hint,
region_model_context * ctxt ) const
private

◆ check_region_bounds()

bool ana::region_model::check_region_bounds ( const region * reg,
enum access_direction dir,
const svalue * sval_hint,
region_model_context * ctxt ) const
private

◆ check_region_for_read()

bool ana::region_model::check_region_for_read ( const region * src_reg,
region_model_context * ctxt ) const
private

◆ check_region_for_taint()

void ana::region_model::check_region_for_taint ( const region * reg,
enum access_direction dir,
region_model_context * ctxt ) const
private

◆ check_region_for_write()

void ana::region_model::check_region_for_write ( const region * dest_reg,
const svalue * sval_hint,
region_model_context * ctxt ) const

◆ check_region_size()

void ana::region_model::check_region_size ( const region * lhs_reg,
const svalue * rhs_sval,
region_model_context * ctxt ) const
private

◆ check_symbolic_bounds()

bool ana::region_model::check_symbolic_bounds ( const region * base_reg,
const svalue * sym_byte_offset,
const svalue * num_bytes_sval,
const svalue * capacity,
enum access_direction dir,
const svalue * sval_hint,
region_model_context * ctxt ) const
private

◆ clobber_region()

void ana::region_model::clobber_region ( const region * reg)

◆ compare_initial_and_pointer()

tristate ana::region_model::compare_initial_and_pointer ( const initial_svalue * init,
const region_svalue * ptr ) const

◆ copy_bytes()

void ana::region_model::copy_bytes ( const region * dest_reg,
const region * src_reg,
tree src_ptr_expr,
const svalue * num_bytes_sval,
region_model_context * ctxt )

◆ create_region_for_alloca()

const region * ana::region_model::create_region_for_alloca ( const svalue * size_in_bytes,
region_model_context * ctxt )

◆ debug()

void ana::region_model::debug ( ) const

◆ deref_rvalue()

const region * ana::region_model::deref_rvalue ( const svalue * ptr_sval,
tree ptr_tree,
region_model_context * ctxt,
bool add_nonnull_constraint = true ) const

◆ dump() [1/2]

void ana::region_model::dump ( bool simple) const

◆ dump() [2/2]

void ana::region_model::dump ( FILE * fp,
bool simple,
bool multiline ) const

◆ dump_to_pp()

void ana::region_model::dump_to_pp ( pretty_printer * pp,
bool simple,
bool multiline ) const

◆ eval_condition() [1/2]

tristate ana::region_model::eval_condition ( const svalue * lhs,
enum tree_code op,
const svalue * rhs ) const

◆ eval_condition() [2/2]

tristate ana::region_model::eval_condition ( tree lhs,
enum tree_code op,
tree rhs,
region_model_context * ctxt ) const

◆ fill_region()

void ana::region_model::fill_region ( const region * reg,
const svalue * sval,
region_model_context * ctxt )

◆ get_builtin_kf()

const builtin_known_function * ana::region_model::get_builtin_kf ( const gcall * call,
region_model_context * ctxt = NULL ) const

◆ get_capacity()

const svalue * ana::region_model::get_capacity ( const region * reg) const

◆ get_constraints()

constraint_manager * ana::region_model::get_constraints ( )
inline

References m_constraints.

◆ get_current_frame()

const frame_region * ana::region_model::get_current_frame ( ) const
inline

References m_current_frame.

◆ get_current_function()

const function * ana::region_model::get_current_function ( ) const

◆ get_dynamic_extents() [1/2]

const dynamic_extents_t & ana::region_model::get_dynamic_extents ( ) const
inline

References m_dynamic_extents.

◆ get_dynamic_extents() [2/2]

const svalue * ana::region_model::get_dynamic_extents ( const region * reg) const

◆ get_fndecl_for_call()

tree ana::region_model::get_fndecl_for_call ( const gcall * call,
region_model_context * ctxt )

◆ get_frame_at_index()

const frame_region * ana::region_model::get_frame_at_index ( int index) const

◆ get_gassign_result()

const svalue * ana::region_model::get_gassign_result ( const gassign * assign,
region_model_context * ctxt )

◆ get_initial_value_for_global()

const svalue * ana::region_model::get_initial_value_for_global ( const region * reg) const
private

◆ get_known_function() [1/2]

const known_function * ana::region_model::get_known_function ( enum internal_fn) const
private

◆ get_known_function() [2/2]

const known_function * ana::region_model::get_known_function ( tree fndecl,
const call_details & cd ) const
private

◆ get_lvalue() [1/2]

const region * ana::region_model::get_lvalue ( path_var pv,
region_model_context * ctxt ) const

◆ get_lvalue() [2/2]

const region * ana::region_model::get_lvalue ( tree expr,
region_model_context * ctxt ) const

◆ get_lvalue_1()

const region * ana::region_model::get_lvalue_1 ( path_var pv,
region_model_context * ctxt ) const
private

◆ get_manager()

region_model_manager * ana::region_model::get_manager ( ) const
inline

◆ get_or_create_region_for_heap_alloc()

const region * ana::region_model::get_or_create_region_for_heap_alloc ( const svalue * size_in_bytes,
region_model_context * ctxt,
bool update_state_machine = false,
const call_details * cd = nullptr )

◆ get_range_manager()

bounded_ranges_manager * ana::region_model::get_range_manager ( ) const
inline

◆ get_reachable_svalues()

void ana::region_model::get_reachable_svalues ( svalue_set * out,
const svalue * extra_sval,
const uncertainty_t * uncertainty )

◆ get_referenced_base_regions()

void ana::region_model::get_referenced_base_regions ( auto_bitmap & out_ids) const

◆ get_region_for_poisoned_expr()

const region * ana::region_model::get_region_for_poisoned_expr ( tree expr) const
private

◆ get_regions_for_current_frame()

void ana::region_model::get_regions_for_current_frame ( auto_vec< const decl_region * > * out) const

◆ get_representative_path_var() [1/2]

path_var ana::region_model::get_representative_path_var ( const region * reg,
svalue_set * visited ) const

◆ get_representative_path_var() [2/2]

path_var ana::region_model::get_representative_path_var ( const svalue * sval,
svalue_set * visited ) const

◆ get_representative_path_var_1() [1/2]

path_var ana::region_model::get_representative_path_var_1 ( const region * reg,
svalue_set * visited ) const
private

◆ get_representative_path_var_1() [2/2]

path_var ana::region_model::get_representative_path_var_1 ( const svalue * sval,
svalue_set * visited ) const
private

◆ get_representative_tree() [1/2]

tree ana::region_model::get_representative_tree ( const region * reg) const

◆ get_representative_tree() [2/2]

tree ana::region_model::get_representative_tree ( const svalue * sval) const

◆ get_rvalue() [1/2]

const svalue * ana::region_model::get_rvalue ( path_var pv,
region_model_context * ctxt ) const

◆ get_rvalue() [2/2]

const svalue * ana::region_model::get_rvalue ( tree expr,
region_model_context * ctxt ) const

◆ get_rvalue_1()

const svalue * ana::region_model::get_rvalue_1 ( path_var pv,
region_model_context * ctxt ) const
private

◆ get_rvalue_for_bits()

const svalue * ana::region_model::get_rvalue_for_bits ( tree type,
const region * reg,
const bit_range & bits,
region_model_context * ctxt ) const

◆ get_stack_depth()

int ana::region_model::get_stack_depth ( ) const

◆ get_store() [1/2]

store * ana::region_model::get_store ( )
inline

References m_store.

◆ get_store() [2/2]

const store * ana::region_model::get_store ( ) const
inline

References m_store.

◆ get_store_bytes()

const svalue * ana::region_model::get_store_bytes ( const region * base_reg,
const byte_range & bytes,
region_model_context * ctxt ) const

◆ get_store_value()

const svalue * ana::region_model::get_store_value ( const region * reg,
region_model_context * ctxt ) const

◆ handle_phi()

void ana::region_model::handle_phi ( const gphi * phi,
tree lhs,
tree rhs,
const region_model & old_state,
hash_set< const svalue * > & svals_changing_meaning,
region_model_context * ctxt )

◆ handle_unrecognized_call()

void ana::region_model::handle_unrecognized_call ( const gcall * call,
region_model_context * ctxt )

◆ hash()

hashval_t ana::region_model::hash ( ) const

◆ impl_deallocation_call()

void ana::region_model::impl_deallocation_call ( const call_details & cd)

◆ loop_replay_fixup()

void ana::region_model::loop_replay_fixup ( const region_model * dst_state)

◆ mark_as_tainted()

void ana::region_model::mark_as_tainted ( const svalue * sval,
region_model_context * ctxt )

◆ mark_as_valid_fd()

void ana::region_model::mark_as_valid_fd ( const svalue * sval,
region_model_context * ctxt )

◆ mark_region_as_unknown()

void ana::region_model::mark_region_as_unknown ( const region * reg,
uncertainty_t * uncertainty )

◆ maybe_complain_about_infoleak()

void ana::region_model::maybe_complain_about_infoleak ( const region * dst_reg,
const svalue * copied_sval,
const region * src_reg,
region_model_context * ctxt )

◆ maybe_get_copy_bounds()

const svalue * ana::region_model::maybe_get_copy_bounds ( const region * src_reg,
const svalue * num_bytes_sval )

◆ maybe_update_for_edge()

bool ana::region_model::maybe_update_for_edge ( const superedge & edge,
const gimple * last_stmt,
region_model_context * ctxt,
std::unique_ptr< rejected_constraint > * out )

◆ notify_on_pop_frame()

static void ana::region_model::notify_on_pop_frame ( const region_model * model,
const region_model * prev_model,
const svalue * retval,
region_model_context * ctxt )
inlinestatic

References ggc_alloc(), and pop_frame_callbacks.

◆ on_asm_stmt()

void ana::region_model::on_asm_stmt ( const gasm * asm_stmt,
region_model_context * ctxt )

◆ on_assignment()

void ana::region_model::on_assignment ( const gassign * stmt,
region_model_context * ctxt )

◆ on_call_post()

void ana::region_model::on_call_post ( const gcall * stmt,
bool unknown_side_effects,
region_model_context * ctxt )

◆ on_call_pre()

bool ana::region_model::on_call_pre ( const gcall * stmt,
region_model_context * ctxt )

◆ on_longjmp()

void ana::region_model::on_longjmp ( const gcall * longjmp_call,
const gcall * setjmp_call,
int setjmp_stack_depth,
region_model_context * ctxt )

◆ on_realloc_with_move()

void ana::region_model::on_realloc_with_move ( const call_details & cd,
const svalue * old_ptr_sval,
const svalue * new_ptr_sval )

◆ on_return()

void ana::region_model::on_return ( const greturn * stmt,
region_model_context * ctxt )

◆ on_setjmp()

void ana::region_model::on_setjmp ( const gcall * stmt,
const exploded_node * enode,
region_model_context * ctxt )

◆ on_stmt_pre()

void ana::region_model::on_stmt_pre ( const gimple * stmt,
bool * out_unknown_side_effects,
region_model_context * ctxt )

◆ on_top_level_param()

void ana::region_model::on_top_level_param ( tree param,
bool nonnull,
region_model_context * ctxt )
private

◆ operator!=()

bool ana::region_model::operator!= ( const region_model & other) const
inline

◆ operator=()

region_model & ana::region_model::operator= ( const region_model & other)

◆ operator==()

bool ana::region_model::operator== ( const region_model & other) const

◆ poison_any_pointers_to_descendents()

int ana::region_model::poison_any_pointers_to_descendents ( const region * reg,
enum poison_kind pkind )
private

◆ pop_frame()

void ana::region_model::pop_frame ( tree result_lvalue,
const svalue ** out_result,
region_model_context * ctxt,
bool eval_return_svalue = true )

◆ print()

void ana::region_model::print ( pretty_printer * pp) const

◆ purge_region()

void ana::region_model::purge_region ( const region * reg)

◆ purge_state_involving()

void ana::region_model::purge_state_involving ( const svalue * sval,
region_model_context * ctxt )

◆ push_frame()

const region * ana::region_model::push_frame ( const function & fun,
const vec< const svalue * > * arg_sids,
region_model_context * ctxt )

◆ read_bytes()

const svalue * ana::region_model::read_bytes ( const region * src_reg,
tree src_ptr_expr,
const svalue * num_bytes_sval,
region_model_context * ctxt ) const

◆ region_exists_p()

bool ana::region_model::region_exists_p ( const region * reg) const

◆ register_pop_frame_callback()

static void ana::region_model::register_pop_frame_callback ( const pop_frame_callback & callback)
inlinestatic

References pop_frame_callbacks.

◆ replay_call_summary()

bool ana::region_model::replay_call_summary ( call_summary_replay & r,
const region_model & summary )

◆ scan_for_null_terminator()

const svalue * ana::region_model::scan_for_null_terminator ( const region * reg,
tree expr,
const svalue ** out_sval,
region_model_context * ctxt ) const

◆ scan_for_null_terminator_1()

const svalue * ana::region_model::scan_for_null_terminator_1 ( const region * reg,
tree expr,
const svalue ** out_sval,
region_model_context * ctxt ) const

◆ set_dynamic_extents()

void ana::region_model::set_dynamic_extents ( const region * reg,
const svalue * size_in_bytes,
region_model_context * ctxt )

◆ set_errno()

void ana::region_model::set_errno ( const call_details & cd)

◆ set_value() [1/2]

void ana::region_model::set_value ( const region * lhs_reg,
const svalue * rhs_sval,
region_model_context * ctxt )

◆ set_value() [2/2]

void ana::region_model::set_value ( tree lhs,
tree rhs,
region_model_context * ctxt )

◆ structural_equality()

tristate ana::region_model::structural_equality ( const svalue * a,
const svalue * b ) const

◆ symbolic_greater_than()

tristate ana::region_model::symbolic_greater_than ( const binop_svalue * a,
const svalue * b ) const

◆ to_json()

json::object * ana::region_model::to_json ( ) const

◆ transition_ptr_sval_non_null()

void ana::region_model::transition_ptr_sval_non_null ( region_model_context * ctxt,
const svalue * new_ptr_sval )

◆ unbind_region_and_descendents()

void ana::region_model::unbind_region_and_descendents ( const region * reg,
enum poison_kind pkind )

◆ unset_dynamic_extents()

void ana::region_model::unset_dynamic_extents ( const region * reg)

◆ update_for_call_superedge()

void ana::region_model::update_for_call_superedge ( const call_superedge & call_edge,
region_model_context * ctxt )
private

◆ update_for_gcall()

void ana::region_model::update_for_gcall ( const gcall * call_stmt,
region_model_context * ctxt,
function * callee = NULL )

◆ update_for_int_cst_return()

void ana::region_model::update_for_int_cst_return ( const call_details & cd,
int retval,
bool unmergeable )

◆ update_for_nonzero_return()

void ana::region_model::update_for_nonzero_return ( const call_details & cd)

◆ update_for_phis()

void ana::region_model::update_for_phis ( const supernode * snode,
const cfg_superedge * last_cfg_superedge,
region_model_context * ctxt )

◆ update_for_return_gcall()

void ana::region_model::update_for_return_gcall ( const gcall * call_stmt,
region_model_context * ctxt )

◆ update_for_return_superedge()

void ana::region_model::update_for_return_superedge ( const return_superedge & return_edge,
region_model_context * ctxt )
private

◆ update_for_zero_return()

void ana::region_model::update_for_zero_return ( const call_details & cd,
bool unmergeable )

◆ validate()

void ana::region_model::validate ( ) const

◆ write_bytes()

void ana::region_model::write_bytes ( const region * dest_reg,
const svalue * num_bytes_sval,
const svalue * sval,
region_model_context * ctxt )

◆ zero_fill_region()

void ana::region_model::zero_fill_region ( const region * reg,
region_model_context * ctxt )

Field Documentation

◆ m_constraints

constraint_manager* ana::region_model::m_constraints
private

Referenced by get_constraints().

◆ m_current_frame

const frame_region* ana::region_model::m_current_frame
private

Referenced by get_current_frame().

◆ m_dynamic_extents

dynamic_extents_t ana::region_model::m_dynamic_extents
private

Referenced by get_dynamic_extents().

◆ m_mgr

region_model_manager* const ana::region_model::m_mgr
private

Referenced by get_manager(), and get_range_manager().

◆ m_store

store ana::region_model::m_store
private

Referenced by get_store(), and get_store().

◆ pop_frame_callbacks

auto_vec<pop_frame_callback> ana::region_model::pop_frame_callbacks
staticprivate

The documentation for this class was generated from the following file: