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 (symbolic::node_manager &node_mgr)
 region_model (const region_model &other)
 ~region_model ()
region_model & operator= (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_logger (logger &) const
void dump_to_pp (pretty_printer *pp) const
void dump () const
std::unique_ptr< json::object > to_json () const
std::unique_ptr< text_art::tree_widget > make_dump_widget (symbolic::node_dump_state &nds) 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 svalue * get_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 symbolic::node &node, region_model_context *ctxt)
void impl_deallocation_call (const call_details &cd)
const svalue * maybe_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_null_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 (value_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, const superedge &sedge, 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_gcall (const gcall &call_stmt, region_model_context *ctxt, function *callee=nullptr)
void update_for_return_gcall (const gcall &call_stmt, region_model_context *ctxt)
const region * push_frame (const function &fun, const gcall *call_stmt, const vec< const svalue * > *arg_sids, region_model_context *ctxt)
const frame_region * get_current_frame () const
const function * get_current_function () const
void pop_frame (tree result_lvalue, const svalue **out_result, region_model_context *ctxt, const gcall *call_stmt, bool eval_return_svalue=true)
int get_stack_depth () const
const frame_region * get_frame_at_index (int index) const
const region * get_lvalue (path_var pv, region_model_context *ctxt) const
const region * get_lvalue (tree expr, region_model_context *ctxt) const
const svalue * get_rvalue (path_var pv, region_model_context *ctxt) const
const svalue * get_rvalue (tree expr, region_model_context *ctxt) const
const region * deref_rvalue (const svalue *ptr_sval, tree ptr_tree, region_model_context *ctxt, bool add_nonnull_constraint=true) const
const svalue * get_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 zero_fill_region (const region *reg, region_model_context *ctxt)
void write_bytes (symbolic::pointer dest_sym_ptr, const symbolic::bit_vector &bytes, region_model_context *ctxt)
const symbolic::bit_vector & read_bytes (symbolic::pointer src_sym_ptr, tree src_ptr_expr, const symbolic_byte_size &num_bytes, region_model_context *ctxt) const
void copy_bytes (symbolic::pointer dest_sym_ptr, symbolic::pointer src_sym_ptr, tree src_ptr_expr, const symbolic_byte_size &num_bytes, region_model_context *ctxt)
void mark_region_as_unknown (const region *reg, uncertainty_t *uncertainty)
void mark_region_as_conjured (const region &base_reg, const gimple &stmt, region_model_context *ctxt)
tristate eval_condition (const svalue *lhs, enum tree_code op, const svalue *rhs) const
tristate compare_initial_and_pointer (const initial_svalue *init, const symbolic::pointer &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 region * 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)
const region * create_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, logger *logger=nullptr) const
tree get_representative_tree (const region *reg, logger *logger=nullptr) const
path_var get_representative_path_var (const svalue *sval, value_set *visited, logger *logger) const
path_var get_representative_path_var (const region *reg, value_set *visited, logger *logger) const
const region * maybe_get_region_for_mem_range (const symbolic::memory_range &mem_range, tree type, logger *logger=nullptr) const
constraint_manager * get_constraints ()
store * get_store ()
const store * get_store () const
const dynamic_extents_t & get_dynamic_extents () const
const svalue * get_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)
symbolic::node_manager & get_node_manager () const
region_model_manager * get_manager () const
bounded_ranges_manager * get_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=nullptr, const program_state *state_a=nullptr, const program_state *state_b=nullptr) const
tree get_fndecl_for_call (const gcall &call, region_model_context *ctxt)
tree get_fndecl_for_virtual_call (const_tree fn_ptr, region_model_context *ctxt)
tree get_vtable_from_obj (tree obj, tree obj_type, region_model_manager *mgr, region_model_context *ctxt, unsigned HOST_WIDE_INT *out=nullptr) const
void get_regions_for_current_frame (auto_vec< const decl_region * > *out) const
const svalue * get_store_value (const region *reg, region_model_context *ctxt) const
const symbolic::bit_vector & get_store_bits (const symbolic::memory_range &mem_range, region_model_context *ctxt) const
const symbolic::bit_contents & get_bit_contents (const region &base_reg) const
void set_bit_contents_raw (const region &base_reg, const symbolic::bit_contents &new_bc)
const svalue * scan_for_null_terminator (const region *reg, tree expr, const symbolic::bit_vector **out_bv, region_model_context *ctxt) const
const svalue * scan_for_null_terminator_1 (const region *reg, tree expr, const symbolic::bit_vector **out_bv, region_model_context *ctxt) const
void write_to_memory_offset (const symbolic::memory_offset &mem_offset, const symbolic::bit_vector &bv, region_model_context *ctxt)
bool region_exists_p (const region *reg) const
void loop_replay_fixup (const region_model *dst_state)
const svalue * get_capacity (const region *reg) const
const symbolic::scalar< integer_with_unit< units::byte > > & get_capacity_as_scalar (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 svalue * check_for_poison (const svalue *sval, tree expr, const region *src_region, region_model_context *ctxt) const
void check_bytes_for_poison (const symbolic::bit_vector &bv, symbolic::pointer sym_ptr, tree sym_ptr_expr, region_model_context *ctxt) const
void check_region_for_write (const region *dest_reg, const svalue *sval_hint, region_model_context *ctxt) const
const svalue * check_for_null_terminated_string_arg (const call_details &cd, unsigned idx) const
const svalue * check_for_null_terminated_string_arg (const call_details &cd, unsigned idx, bool include_terminator, const symbolic::bit_vector **out_bv) const
const builtin_known_function * get_builtin_kf (const gcall &call, region_model_context *ctxt=nullptr) const
bool called_from_main_p () const
baseline_state get_baseline_state () const
void push_thrown_exception (const exception_node &node)
const exception_node * get_current_thrown_exception () const
exception_node pop_thrown_exception ()
void push_caught_exception (const exception_node &node)
const exception_node * get_current_caught_exception () const
exception_node pop_caught_exception ()
bool bits_live_p (const symbolic::bit_vector_from_ubc &bv_from_ubc) const

Static Public Member Functions

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

Private Member Functions

const region * get_lvalue_1 (path_var pv, region_model_context *ctxt) const
const svalue * get_rvalue_1 (path_var pv, region_model_context *ctxt) const
path_var get_representative_path_var_1 (const svalue *sval, value_set *visited, logger *logger) const
path_var get_representative_path_var_1 (const region *reg, value_set *visited, logger *logger) const
const known_function * get_known_function (tree fndecl, const call_details &cd) const
const known_function * get_known_function (enum internal_fninternal_fn) const
const region * maybe_get_subregion_for_symbolic_bit_range (const region &reg, tree type, symbolic_bit_range bit_range) const
const region * maybe_get_subregion_for_concrete_bit_range (const region &reg, tree desired_type, concrete_bit_range bit_range) const
const region * maybe_get_subregion_for_symbolic_bit_range_in_array (const region &array_reg, tree desired_type, symbolic_bit_range bit_range) const
const region * maybe_get_subregion_for_symbolic_bit_range_in_record (const region &record_reg, tree desired_type, symbolic_bit_range bit_range) 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 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 svalue * get_initial_value_for_global (const region *reg) const
const region * get_region_for_poisoned_expr (tree expr) const
const svalue * complain_about_poison (const svalue *sval, tree expr, const region *src_region, region_model_context *ctxt, enum poison_kind pkind) const
void check_dynamic_size_for_taint (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_memory_range_for_taint (const symbolic::memory_range &mem_range, enum access_direction dir, region_model_context *ctxt) const
void check_region_for_taint (const region *reg, enum access_directionaccess_direction, region_model_context *ctxt) const
void check_for_writable_region (const region *dest_reg, region_model_context *ctxt) const
bool check_memory_range_access (const symbolic::memory_range &mem_range, enum access_direction dir, const svalue *sval_hint, 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
void check_region_size (const region *lhs_reg, const svalue *rhs_sval, region_model_context *ctxt) const
bool check_memory_range_bounds (const symbolic::memory_range &mem_range, enum access_direction dir, const svalue *sval_hint, region_model_context *ctxt) const
bool check_symbolic_bounds (const symbolic::memory_range &attempted_range, 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)
void check_for_throw_inside_call (const gcall &call, tree fndecl, region_model_context *ctxt)
const svalue * canonicalize_svalue_for_constraint (const svalue *sval) const
bool can_recurse_eval_condition_p (const unaryop_svalue *unary_op) const

Private Attributes

symbolic::node_manager & m_node_mgr
region_model_manager *const m_mgr
store m_store
constraint_manager * m_constraints
const frame_region * m_current_frame
std::vector< exception_node > m_thrown_exceptions_stack
std::vector< exception_node > m_caught_exceptions_stack
dynamic_extents_t m_dynamic_extents

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]

◆ region_model() [2/2]

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

References region_model().

◆ ~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()

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

◆ bits_live_p()

bool ana::region_model::bits_live_p ( const symbolic::bit_vector_from_ubc & bv_from_ubc) const
inline

◆ 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 = nullptr,
const program_state * state_a = nullptr,
const program_state * state_b = nullptr ) const

References region_model().

◆ can_recurse_eval_condition_p()

bool ana::region_model::can_recurse_eval_condition_p ( const unaryop_svalue * unary_op) const
private

References unary_op.

◆ canonicalize()

void ana::region_model::canonicalize ( )

◆ canonicalize_svalue_for_constraint()

const svalue * ana::region_model::canonicalize_svalue_for_constraint ( const svalue * sval) const
private

◆ canonicalized_p()

bool ana::region_model::canonicalized_p ( ) const

◆ check_bytes_for_poison()

void ana::region_model::check_bytes_for_poison ( const symbolic::bit_vector & bv,
symbolic::pointer sym_ptr,
tree sym_ptr_expr,
region_model_context * ctxt ) 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

References size_in_bytes().

◆ check_dynamic_size_for_taint()

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

References size_in_bytes().

◆ 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 symbolic::bit_vector ** out_bv ) 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_throw_inside_call()

void ana::region_model::check_for_throw_inside_call ( const gcall & call,
tree fndecl,
region_model_context * ctxt )
private

◆ 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_memory_range_access()

bool ana::region_model::check_memory_range_access ( const symbolic::memory_range & mem_range,
enum access_direction dir,
const svalue * sval_hint,
region_model_context * ctxt ) const
private

◆ check_memory_range_bounds()

bool ana::region_model::check_memory_range_bounds ( const symbolic::memory_range & mem_range,
enum access_direction dir,
const svalue * sval_hint,
region_model_context * ctxt ) const
private

◆ check_memory_range_for_taint()

void ana::region_model::check_memory_range_for_taint ( const symbolic::memory_range & mem_range,
enum access_direction dir,
region_model_context * ctxt ) const
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_taint()

void ana::region_model::check_region_for_taint ( const region * reg,
enum access_direction,
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 symbolic::memory_range & attempted_range,
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 symbolic::pointer & ptr ) const

◆ complain_about_poison()

const svalue * ana::region_model::complain_about_poison ( const svalue * sval,
tree expr,
const region * src_region,
region_model_context * ctxt,
enum poison_kind pkind ) const
private

◆ copy_bytes()

void ana::region_model::copy_bytes ( symbolic::pointer dest_sym_ptr,
symbolic::pointer src_sym_ptr,
tree src_ptr_expr,
const symbolic_byte_size & num_bytes,
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 )

References size_in_bytes().

◆ 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()

void ana::region_model::dump ( ) const

◆ dump_to_logger()

void ana::region_model::dump_to_logger ( logger & ) const

◆ dump_to_pp()

void ana::region_model::dump_to_pp ( pretty_printer * pp) 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

◆ get_baseline_state()

baseline_state ana::region_model::get_baseline_state ( ) const

◆ get_bit_contents()

const symbolic::bit_contents & ana::region_model::get_bit_contents ( const region & base_reg) const

◆ get_builtin_kf()

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

◆ get_capacity()

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

◆ get_capacity_as_scalar()

const symbolic::scalar< integer_with_unit< units::byte > > & ana::region_model::get_capacity_as_scalar ( const region * reg) const

◆ get_constraints()

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

References m_constraints.

◆ get_current_caught_exception()

const exception_node * ana::region_model::get_current_caught_exception ( ) const
inline

◆ get_current_frame()

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

◆ get_current_function()

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

◆ get_current_thrown_exception()

const exception_node * ana::region_model::get_current_thrown_exception ( ) const
inline

◆ 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_fndecl_for_virtual_call()

tree ana::region_model::get_fndecl_for_virtual_call ( const_tree fn_ptr,
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()

◆ get_node_manager()

symbolic::node_manager & ana::region_model::get_node_manager ( ) const
inline

References m_node_mgr.

◆ 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 )

References size_in_bytes().

◆ get_range_manager()

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

◆ get_reachable_svalues()

void ana::region_model::get_reachable_svalues ( value_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,
value_set * visited,
logger * logger ) const

◆ get_representative_path_var() [2/2]

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

◆ get_representative_path_var_1() [1/2]

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

◆ get_representative_path_var_1() [2/2]

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

◆ get_representative_tree() [1/2]

tree ana::region_model::get_representative_tree ( const region * reg,
logger * logger = nullptr ) const

◆ get_representative_tree() [2/2]

tree ana::region_model::get_representative_tree ( const svalue * sval,
logger * logger = nullptr ) const

◆ get_rvalue() [1/2]

◆ 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.

Referenced by sufficiently_different_p().

◆ get_store() [2/2]

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

References m_store.

◆ get_store_bits()

const symbolic::bit_vector & ana::region_model::get_store_bits ( const symbolic::memory_range & mem_range,
region_model_context * ctxt ) const

◆ get_store_value()

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

◆ get_vtable_from_obj()

tree ana::region_model::get_vtable_from_obj ( tree obj,
tree obj_type,
region_model_manager * mgr,
region_model_context * ctxt,
unsigned HOST_WIDE_INT * out = nullptr ) const

◆ 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)

References region_model().

◆ make_dump_widget()

std::unique_ptr< text_art::tree_widget > ana::region_model::make_dump_widget ( symbolic::node_dump_state & nds) const

◆ 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_conjured()

void ana::region_model::mark_region_as_conjured ( const region & base_reg,
const gimple & stmt,
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_get_region_for_mem_range()

const region * ana::region_model::maybe_get_region_for_mem_range ( const symbolic::memory_range & mem_range,
tree type,
logger * logger = nullptr ) const

◆ maybe_get_subregion_for_concrete_bit_range()

const region * ana::region_model::maybe_get_subregion_for_concrete_bit_range ( const region & reg,
tree desired_type,
concrete_bit_range bit_range ) const
private

◆ maybe_get_subregion_for_symbolic_bit_range()

const region * ana::region_model::maybe_get_subregion_for_symbolic_bit_range ( const region & reg,
tree type,
symbolic_bit_range bit_range ) const
private

◆ maybe_get_subregion_for_symbolic_bit_range_in_array()

const region * ana::region_model::maybe_get_subregion_for_symbolic_bit_range_in_array ( const region & array_reg,
tree desired_type,
symbolic_bit_range bit_range ) const
private

◆ maybe_get_subregion_for_symbolic_bit_range_in_record()

const region * ana::region_model::maybe_get_subregion_for_symbolic_bit_range_in_record ( const region & record_reg,
tree desired_type,
symbolic_bit_range bit_range ) const
private

◆ 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,
const superedge & sedge,
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

References ana::other, and region_model().

◆ operator=()

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

References region_model().

◆ operator==()

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

References region_model().

◆ poison_any_pointers_to_descendents()

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

◆ pop_caught_exception()

exception_node ana::region_model::pop_caught_exception ( )
inline

◆ pop_frame()

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

◆ pop_thrown_exception()

exception_node ana::region_model::pop_thrown_exception ( )
inline

◆ 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 symbolic::node & node,
region_model_context * ctxt )

◆ push_caught_exception()

void ana::region_model::push_caught_exception ( const exception_node & node)
inline

◆ push_frame()

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

◆ push_thrown_exception()

void ana::region_model::push_thrown_exception ( const exception_node & node)
inline

◆ read_bytes()

const symbolic::bit_vector & ana::region_model::read_bytes ( symbolic::pointer src_sym_ptr,
tree src_ptr_expr,
const symbolic_byte_size & num_bytes,
region_model_context * ctxt ) const

◆ region_exists_p()

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

◆ replay_call_summary()

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

References r, and region_model().

◆ scan_for_null_terminator()

const svalue * ana::region_model::scan_for_null_terminator ( const region * reg,
tree expr,
const symbolic::bit_vector ** out_bv,
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 symbolic::bit_vector ** out_bv,
region_model_context * ctxt ) const

◆ set_bit_contents_raw()

void ana::region_model::set_bit_contents_raw ( const region & base_reg,
const symbolic::bit_contents & new_bc )

◆ set_dynamic_extents()

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

References size_in_bytes().

◆ 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

References a, and b.

◆ symbolic_greater_than()

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

References a, and b.

◆ to_json()

std::unique_ptr< 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_gcall()

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

◆ 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_null_return()

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

◆ update_for_return_gcall()

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

◆ 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 ( symbolic::pointer dest_sym_ptr,
const symbolic::bit_vector & bytes,
region_model_context * ctxt )

◆ write_to_memory_offset()

void ana::region_model::write_to_memory_offset ( const symbolic::memory_offset & mem_offset,
const symbolic::bit_vector & bv,
region_model_context * ctxt )

◆ zero_fill_region()

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

Field Documentation

◆ m_caught_exceptions_stack

std::vector<exception_node> ana::region_model::m_caught_exceptions_stack
private

◆ 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().

◆ m_node_mgr

symbolic::node_manager& ana::region_model::m_node_mgr
private

Referenced by get_node_manager().

◆ m_store

store ana::region_model::m_store
private

Referenced by bits_live_p(), get_store(), and get_store().

◆ m_thrown_exceptions_stack

std::vector<exception_node> ana::region_model::m_thrown_exceptions_stack
private

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