Home
last modified time | relevance | path

Searched refs:smatch_state (Results 1 – 25 of 72) sorted by relevance

123

/illumos-gate/usr/src/tools/smatch/src/
H A Dsmatch_extra.h84 int estate_is_unknown(struct smatch_state *state);
105 void set_real_absolute(struct expression *expr, struct smatch_state *state);
121 struct smatch_state *alloc_estate_empty(void);
122 struct smatch_state *alloc_estate_sval(sval_t sval);
123 struct smatch_state *alloc_estate_range(sval_t min, sval_t max);
124 struct smatch_state *alloc_estate_rl(struct range_list *rl);
125 struct smatch_state *alloc_estate_whole(struct symbol *type);
126 struct smatch_state *clone_estate(struct smatch_state *state);
127 struct smatch_state *clone_estate_cast(struct symbol *type, struct smatch_state *state);
128 struct smatch_state *clone_partial_estate(struct smatch_state *state, struct range_list *rl);
[all …]
H A Dsmatch_estate.c33 struct smatch_state *merge_estates(struct smatch_state *s1, struct smatch_state *s2) in merge_estates()
35 struct smatch_state *tmp; in merge_estates()
65 struct data_info *get_dinfo(struct smatch_state *state) in get_dinfo()
72 struct range_list *estate_rl(struct smatch_state *state) in estate_rl()
79 struct related_list *estate_related(struct smatch_state *state) in estate_related()
86 sval_t estate_get_fuzzy_max(struct smatch_state *state) in estate_get_fuzzy_max()
95 int estate_has_fuzzy_max(struct smatch_state *state) in estate_has_fuzzy_max()
102 void estate_set_fuzzy_max(struct smatch_state *state, sval_t fuzzy_max) in estate_set_fuzzy_max()
109 void estate_copy_fuzzy_max(struct smatch_state *new, struct smatch_state *old) in estate_copy_fuzzy_max()
116 void estate_clear_fuzzy_max(struct smatch_state *state) in estate_clear_fuzzy_max()
[all …]
H A Dsmatch_param_limit.c65 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state()
67 struct smatch_state *state; in unmatched_state()
75 struct smatch_state *get_orig_estate(const char *name, struct symbol *sym) in get_orig_estate()
77 struct smatch_state *state; in get_orig_estate()
89 struct smatch_state *get_orig_estate_type(const char *name, struct symbol *sym, struct symbol *type) in get_orig_estate_type()
91 struct smatch_state *state; in get_orig_estate_type()
103 static struct range_list *generify_mtag_range(struct smatch_state *state) in generify_mtag_range()
135 struct smatch_state *state, *old; in print_return_value_param()
169 …mod_hook(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in extra_mod_hook()
171 struct smatch_state *orig_vals; in extra_mod_hook()
H A Dsmatch_stored_conditions.c45 static struct smatch_state *alloc_link_state(struct expression_list *expr_list) in alloc_link_state()
48 struct smatch_state *state; in alloc_link_state()
96 static struct smatch_state *merge_links(struct smatch_state *s1, struct smatch_state *s2) in merge_links()
113 struct smatch_state *old_state, *new_state; in save_link_var_sym()
141 static struct smatch_state *alloc_state(struct expression *expr, int is_true) in alloc_state()
143 struct smatch_state *state; in alloc_state()
194 struct smatch_state *true_state, *false_state; in __stored_condition()
214 struct smatch_state *get_stored_condition(struct expression *expr) in get_stored_condition()
216 struct smatch_state *state; in get_stored_condition()
230 struct smatch_state *state; in get_conditions()
H A Dsmatch.h49 struct smatch_state { struct
53 #define STATE(_x) static struct smatch_state _x = { .name = #_x } argument
54 extern struct smatch_state undefined;
55 extern struct smatch_state ghost;
56 extern struct smatch_state merged;
57 extern struct smatch_state true_state;
58 extern struct smatch_state false_state;
59 DECLARE_ALLOCATOR(smatch_state);
87 struct smatch_state *state;
166 typedef struct smatch_state *(merge_func_t)(struct smatch_state *s1, struct smatch_state *s2);
[all …]
H A Dcheck_readl_infinite_loops.c27 DECLARE_PTR_LIST(state_stack, struct smatch_state);
98 struct smatch_state *tmp; in match_return()
109 static void push_state_at_start(struct smatch_state *state) in push_state_at_start()
114 static struct smatch_state *pop_state_at_start(void) in pop_state_at_start()
116 struct smatch_state *state; in pop_state_at_start()
125 struct smatch_state *state; in before_loop()
137 struct smatch_state *old_state; in after_loop()
H A Dcheck_get_user_overflow.c35 struct smatch_state *left_max_true = NULL; in match_condition()
36 struct smatch_state *left_max_false = NULL; in match_condition()
37 struct smatch_state *right_max_true = NULL; in match_condition()
38 struct smatch_state *right_max_false = NULL; in match_condition()
40 struct smatch_state *left_min_true = NULL; in match_condition()
41 struct smatch_state *left_min_false = NULL; in match_condition()
42 struct smatch_state *right_min_true = NULL; in match_condition()
43 struct smatch_state *right_min_false = NULL; in match_condition()
H A Dsmatch_real_absolute.c39 void set_real_absolute(struct expression *expr, struct smatch_state *state) in set_real_absolute()
44 …mod_hook(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in extra_mod_hook()
46 struct smatch_state *abs; in extra_mod_hook()
58 struct smatch_state *extra; in pre_merge_hook()
72 static struct smatch_state *empty_state(struct sm_state *sm) in empty_state()
130 struct smatch_state *get_real_absolute_state(struct expression *expr) in get_real_absolute_state()
135 struct smatch_state *get_real_absolute_state_var_sym(const char *name, struct symbol *sym) in get_real_absolute_state_var_sym()
H A Dsmatch_imaginary_absolute.c39 static struct smatch_state *empty_state(struct sm_state *sm) in empty_state()
44 struct smatch_state *merge_is_empty(struct smatch_state *s1, struct smatch_state *s2) in merge_is_empty()
63 struct smatch_state *state; in get_imaginary_absolute()
H A Dsmatch_links.c26 static struct smatch_state *alloc_link(struct var_sym_list *links) in alloc_link()
28 struct smatch_state *state; in alloc_link()
50 struct smatch_state *merge_link_states(struct smatch_state *s1, struct smatch_state *s2) in merge_link_states()
71 struct smatch_state *old_state; in store_link()
H A Dsmatch_slist.h27 struct symbol *sym, struct smatch_state *state);
35 int slist_has_state(struct state_list *slist, struct smatch_state *state);
40 struct smatch_state *get_state_stree(struct stree *stree, int owner, const char *name,
49 struct symbol *sym, struct smatch_state *state);
51 struct symbol *sym, struct smatch_state *state);
68 struct symbol *sym, struct smatch_state *state);
73 struct smatch_state *get_state_stree_stack(struct stree_stack *stack, int owner,
H A Dcheck_missing_break.c50 static struct smatch_state *alloc_my_state(struct expression *expr) in alloc_my_state()
52 struct smatch_state *state; in alloc_my_state()
109 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state()
115 static struct smatch_state *merge_hook(struct smatch_state *s1, struct smatch_state *s2) in merge_hook()
H A Dsmatch_param_compare_limit.c38 static struct smatch_state *alloc_link_state(struct string_list *links) in alloc_link_state()
40 struct smatch_state *state; in alloc_link_state()
62 static struct smatch_state *merge_links(struct smatch_state *s1, struct smatch_state *s2) in merge_links()
64 struct smatch_state *ret; in merge_links()
74 struct smatch_state *old_state, *new_state; in save_link_var_sym()
96 struct smatch_state *state; in add_comparison_var_sym()
129 struct smatch_state *true_state, struct smatch_state *false_state) in __compare_param_limit_hook()
H A Dsmatch_statement_count.c26 static struct smatch_state *merge_states(struct smatch_state *s1, struct smatch_state *s2) in merge_states()
41 struct smatch_state *state; in get_stmt_cnt()
H A Dsmatch_states.c40 struct smatch_state undefined = { .name = "undefined" };
41 struct smatch_state ghost = { .name = "ghost" };
42 struct smatch_state merged = { .name = "merged" };
43 struct smatch_state true_state = { .name = "true" };
44 struct smatch_state false_state = { .name = "false" };
131 static void call_tracker_hooks(int owner, const char *name, struct symbol *sym, struct smatch_state in call_tracker_hooks()
151 struct sm_state *set_state(int owner, const char *name, struct symbol *sym, struct smatch_state *st… in set_state()
162 struct smatch_state *s; in set_state()
187 struct sm_state *set_state_expr(int owner, struct expression *expr, struct smatch_state *state) in set_state_expr()
272 struct smatch_state *s; in __set_sm()
[all …]
H A Dsmatch_constraints.c114 static struct smatch_state *alloc_constraint_state(struct constraint_list *list) in alloc_constraint_state()
116 struct smatch_state *state; in alloc_constraint_state()
134 static struct smatch_state *merge_func(struct smatch_state *s1, struct smatch_state *s2) in merge_func()
296 struct smatch_state *state; in unmet_constraint()
353 struct smatch_state *state; in handle_comparison()
400 struct smatch_state *state; in get_constraints()
411 struct smatch_state *state; in match_caller_info()
431 static struct smatch_state *constraint_str_to_state(char *value) in constraint_str_to_state()
475 struct smatch_state *orig; in print_return_implies_constrained()
H A Dsmatch_capped.c41 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state()
43 struct smatch_state *state; in unmatched_state()
146 struct smatch_state *left_true = NULL; in match_condition()
147 struct smatch_state *left_false = NULL; in match_condition()
148 struct smatch_state *right_true = NULL; in match_condition()
149 struct smatch_state *right_false = NULL; in match_condition()
238 struct smatch_state *estate; in struct_member_callback()
251 struct smatch_state *orig, *estate; in print_return_implies_capped()
H A Dsmatch_extra.c63 …d_hook)(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state);
82 … *hooks, const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in call_extra_hooks()
91 …od_hooks(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in call_extra_mod_hooks()
96 …od_hooks(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in call_extra_nomod_hooks()
101 …ion_info(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in set_union_info()
105 struct smatch_state *new; in set_union_info()
172 …d_helper(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in set_extra_mod_helper()
191 …d_helper(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in set_extra_nomod_helper()
351 …xtra_mod(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in set_extra_mod()
390 static void set_extra_array_mod(struct expression *expr, struct smatch_state *state) in set_extra_array_mod()
[all …]
H A Dsmatch_bits.c44 static struct smatch_state *alloc_bstate(unsigned long long set, unsigned long long possible) in alloc_bstate()
46 struct smatch_state *state; in alloc_bstate()
89 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state()
91 struct smatch_state *estate; in unmatched_state()
165 static struct smatch_state *merge_bstates(struct smatch_state *one_state, struct smatch_state *two_… in merge_bstates()
243 struct smatch_state *bstate; in get_bit_info()
325 struct smatch_state *new; in match_assign()
409 struct smatch_state *estate; in struct_member_callback()
H A Dsmatch_strlen.c36 static struct smatch_state *size_to_estate(int size) in size_to_estate()
46 static struct smatch_state *unmatched_strlen_state(struct sm_state *sm) in unmatched_strlen_state()
78 struct smatch_state *state; in match_strlen()
103 struct smatch_state *true_state = NULL; in match_strlen_condition()
104 struct smatch_state *false_state = NULL; in match_strlen_condition()
237 struct smatch_state *state; in get_strlen_from_state()
248 struct smatch_state *state; in get_strlen_from_equiv()
294 struct smatch_state *state; in set_param_strlen()
H A Dsmatch_kernel_user_data.c81 static struct smatch_state *empty_state(struct sm_state *sm) in empty_state()
88 struct smatch_state *user = cur->state; in pre_merge_hook()
89 struct smatch_state *extra; in pre_merge_hook()
90 struct smatch_state *state; in pre_merge_hook()
105 …mod_hook(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in extra_nomod_hook()
107 struct smatch_state *user, *new; in extra_nomod_hook()
154 struct smatch_state *state; in user_rl_capped()
180 struct smatch_state *state; in user_rl_treat_untagged()
443 struct smatch_state *state; in points_to_user_data()
577 struct smatch_state *state; in handle_op_assign()
[all …]
H A Dsmatch_comparison.c69 struct smatch_state *alloc_compare_state( in alloc_compare_state()
76 struct smatch_state *state; in alloc_compare_state()
93 int state_to_comparison(struct smatch_state *state) in state_to_comparison()
222 struct smatch_state *state; in get_orig_rl()
233 static struct smatch_state *unmatched_comparison(struct sm_state *sm) in unmatched_comparison()
567 struct smatch_state *merge_compare_states(struct smatch_state *s1, struct smatch_state *s2) in merge_compare_states()
582 static struct smatch_state *alloc_link_state(struct string_list *links) in alloc_link_state()
584 struct smatch_state *state; in alloc_link_state()
611 struct smatch_state *state; in save_start_states()
639 static struct smatch_state *merge_links(struct smatch_state *s1, struct smatch_state *s2) in merge_links()
[all …]
H A Dsmatch_param_filter.c62 static struct smatch_state *unmatched_state(struct sm_state *sm) in unmatched_state()
64 struct smatch_state *state; in unmatched_state()
77 struct smatch_state *extra; in pre_merge_hook()
93 …mod_hook(const char *name, struct symbol *sym, struct expression *expr, struct smatch_state *state) in extra_mod_hook()
188 struct smatch_state *state; in param_has_filter_data()
H A Dsmatch_param_to_mtag_data.c53 static struct smatch_state *alloc_tag_data_state(mtag_t tag, char *name, int offset) in alloc_tag_data_state()
55 struct smatch_state *state; in alloc_tag_data_state()
68 struct smatch_state *merge_tag_info(struct smatch_state *s1, struct smatch_state *s2) in merge_tag_info()
H A Dcheck_syscall_arg_type.c44 struct smatch_state *merge_states(struct smatch_state *s1, struct smatch_state *s2) in merge_states()
144 struct smatch_state *state; in get_syscall_arg_type()

123