/illumos-gate/usr/src/tools/smatch/src/ |
H A D | smatch_slist.h | 1 struct stree; 11 struct stree *stree; member 22 void __print_stree(struct stree *stree); 40 struct smatch_state *get_state_stree(struct stree *stree, int owner, const char *name, 43 struct sm_state *get_sm_state_stree(struct stree *stree, int owner, const char *name, 46 void overwrite_sm_state_stree(struct stree **stree, struct sm_state *sm); 48 struct sm_state *set_state_stree(struct stree **stree, int owner, const char *name, 50 void set_state_stree_perm(struct stree **stree, int owner, const char *name, 52 void delete_state_stree(struct stree **stree, int owner, const char *name, 58 void push_stree(struct stree_stack **list_stack, struct stree *stree); [all …]
|
H A D | smatch_states.c | 46 static struct stree *cur_stree; /* current states */ 47 static struct stree *fast_overlay; 203 struct stree *__swap_cur_stree(struct stree *stree) in __swap_cur_stree() argument 205 struct stree *orig = cur_stree; in __swap_cur_stree() 207 cur_stree = stree; in __swap_cur_stree() 217 struct stree *__pop_fake_cur_stree(void) in __pop_fake_cur_stree() 227 struct stree *stree; in __free_fake_cur_stree() local 229 stree = __pop_fake_cur_stree(); in __free_fake_cur_stree() 230 free_stree(&stree); in __free_fake_cur_stree() 233 void __set_fake_cur_stree_fast(struct stree *stree) in __set_fake_cur_stree_fast() argument [all …]
|
H A D | smatch_slist.c | 77 void __print_stree(struct stree *stree) in __print_stree() argument 82 sm_msg("dumping stree [%ld states]", stree_count(stree)); in __print_stree() 83 FOR_EACH_SM(stree, sm) { in __print_stree() 520 struct sm_state *get_sm_state_stree(struct stree *stree, int owner, const char *name, in get_sm_state_stree() argument 533 return avl_lookup(stree, (struct sm_state *)&tracker); in get_sm_state_stree() 536 struct smatch_state *get_state_stree(struct stree *stree, in get_state_stree() argument 542 sm = get_sm_state_stree(stree, owner, name, sym); in get_state_stree() 549 void overwrite_sm_state_stree(struct stree **stree, struct sm_state *new) in overwrite_sm_state_stree() argument 551 avl_insert(stree, new); in overwrite_sm_state_stree() 557 struct stree *stree; in overwrite_sm_state_stree_stack() local [all …]
|
H A D | avl.h | 34 struct stree { struct 36 struct stree *base_stree; argument 43 void free_stree(struct stree **avl); argument 46 struct sm_state *avl_lookup(const struct stree *avl, const struct sm_state *sm); 52 size_t stree_count(const struct stree *avl); 55 bool avl_insert(struct stree **avl, const struct sm_state *sm); 62 bool avl_remove(struct stree **avl, const struct sm_state *sm); 69 bool avl_check_invariants(struct stree *avl); 116 void avl_iter_begin(AvlIter *iter, struct stree *avl, AvlDirection dir); 133 AvlNode *avl_lookup_node(const struct stree *avl, const struct sm_state *sm); [all …]
|
H A D | avl.c | 32 static AvlNode *lookup(const struct stree *avl, AvlNode *node, const struct sm_state *sm); 34 static bool insert_sm(struct stree *avl, AvlNode **p, const struct sm_state *sm); 35 static bool remove_sm(struct stree *avl, AvlNode **p, const struct sm_state *sm, AvlNode **ret); 42 static bool checkOrder(struct stree *avl); 59 static struct stree *avl_new(void) in avl_new() 61 struct stree *avl = malloc(sizeof(*avl)); in avl_new() 75 void free_stree(struct stree **avl) in free_stree() 95 struct sm_state *avl_lookup(const struct stree *avl, const struct sm_state *sm) in avl_lookup() 110 AvlNode *avl_lookup_node(const struct stree *avl, const struct sm_state *sm) in avl_lookup_node() 115 size_t stree_count(const struct stree *avl) in stree_count() [all …]
|
H A D | smatch_function_hooks.c | 255 struct stree *tmp_stree; in assign_ranged_funcs() 256 struct stree *final_states = NULL; in assign_ranged_funcs() 303 …on, struct expression *expr, sval_t sval, int left, struct stree **implied_true, struct stree **im… in call_implies_callbacks() 309 struct stree *true_states = NULL; in call_implies_callbacks() 310 struct stree *false_states = NULL; in call_implies_callbacks() 311 struct stree *tmp_stree; in call_implies_callbacks() 359 struct stree *stree; member 360 struct stree *implied; 653 struct stree *stree; in db_compare_callback() local 671 stree = __pop_fake_cur_stree(); in db_compare_callback() [all …]
|
H A D | smatch_implied.c | 143 struct stree *true_stree, *false_stree; in create_fake_history() 228 static int pool_in_pools(struct stree *pool, in pool_in_pools() 242 static int remove_pool(struct state_list **pools, struct stree *remove) in remove_pool() 587 static struct stree *filter_stack(struct sm_state *gate_sm, in filter_stack() 588 struct stree *pre_stree, in filter_stack() 592 struct stree *ret = NULL; in filter_stack() 629 struct stree *pre_stree, in separate_and_filter() 630 struct stree **true_states, in separate_and_filter() 631 struct stree **false_states, in separate_and_filter() 712 static void delete_gate_sm_equiv(struct stree **stree, const char *name, struct symbol *sym) in delete_gate_sm_equiv() argument [all …]
|
H A D | smatch_returns.c | 48 static struct stree *all_return_states; 62 struct stree *orig; in call_hooks() 73 struct stree *stree; in match_return() local 75 stree = clone_stree(__get_cur_stree()); in match_return() 76 merge_stree_no_pools(&all_return_states, stree); in match_return() 77 push_stree(&return_stree_stack, stree); in match_return() 108 struct stree *get_all_return_states(void) in get_all_return_states()
|
H A D | smatch_conditions.c | 211 static struct stree *combine_strees(struct stree *orig, struct stree *fake, struct stree *new) in combine_strees() 213 struct stree *ret = NULL; in combine_strees() 236 struct stree *a_T = NULL; in handle_select() 237 struct stree *a_F = NULL; in handle_select() 238 struct stree *a_T_b_T = NULL; in handle_select() 239 struct stree *a_T_b_F = NULL; in handle_select() 240 struct stree *a_T_b_fake = NULL; in handle_select() 241 struct stree *a_F_c_T = NULL; in handle_select() 242 struct stree *a_F_c_F = NULL; in handle_select() 243 struct stree *a_F_c_fake = NULL; in handle_select() [all …]
|
H A D | smatch_container_of.c | 380 struct stree *stree; member 450 static void set_param_value(struct stree **stree, struct symbol *arg, int offset, struct range_list… in set_param_value() argument 457 set_state_stree(stree, SMATCH_EXTRA, name, arg, alloc_estate_rl(rl)); in set_param_value() 477 set_param_value(&db_info->stree, db_info->arg, db_info->prev_offset, db_info->rl); in save_vals() 502 static struct stree *load_tag_info_sym(mtag_t tag, struct symbol *arg, int arg_offset, int star) in load_tag_info_sym() 536 set_param_value(&db_info.stree, arg, db_info.prev_offset, db_info.rl); in load_tag_info_sym() 544 set_state_stree(&db_info.stree, SMATCH_EXTRA, arg->ident->name, arg, alloc_estate_sval(sval)); in load_tag_info_sym() 546 return db_info.stree; in load_tag_info_sym() 554 struct stree *stree; in load_container_data() local 610 stree = load_tag_info_sym(arg_tag, arg, arg_offset, star); in load_container_data() [all …]
|
H A D | check_return_enomem.c | 32 struct stree *stree; in match_return() local 46 stree = __get_cur_stree(); in match_return() 48 FOR_EACH_MY_SM(SMATCH_EXTRA, stree, sm) { in match_return()
|
H A D | check_template.c | 88 struct stree *stree; in match_return() local 94 stree = __get_cur_stree(); in match_return() 95 FOR_EACH_MY_SM(my_id, stree, tmp) { in match_return()
|
H A D | check_debug.c | 36 struct stree *stree; in match_all_values() local 38 stree = get_all_states_stree(SMATCH_EXTRA); in match_all_values() 39 __print_stree(stree); in match_all_values() 40 free_stree(&stree); in match_all_values() 99 struct stree *stree; in match_print_value() local 109 stree = __get_cur_stree(); in match_print_value() 110 FOR_EACH_MY_SM(SMATCH_EXTRA, stree, tmp) { in match_print_value() 354 struct stree *stree; in match_possible() local 364 stree = __get_cur_stree(); in match_possible() 365 FOR_EACH_MY_SM(SMATCH_EXTRA, stree, tmp) { in match_possible() [all …]
|
H A D | check_held_dev.c | 68 struct stree *stree; in check_for_held() local 71 stree = __get_cur_stree(); in check_for_held() 72 FOR_EACH_MY_SM(my_id, stree, tmp) { in check_for_held()
|
H A D | check_puts_argument.c | 66 struct stree *stree; in match_return() local 74 stree = __get_cur_stree(); in match_return() 75 FOR_EACH_MY_SM(my_id, stree, tmp) { in match_return()
|
H A D | check_frees_argument.c | 69 struct stree *stree; in match_return() local 77 stree = __get_cur_stree(); in match_return() 78 FOR_EACH_MY_SM(my_id, stree, tmp) { in match_return()
|
H A D | check_nospec.c | 99 struct stree *start_states = get_start_states(); in returned_struct_members() 203 struct stree *stree; in mark_user_data_as_nospec() local 207 stree = get_user_stree(); in mark_user_data_as_nospec() 208 FOR_EACH_SM(stree, sm) { in mark_user_data_as_nospec() 218 free_stree(&stree); in mark_user_data_as_nospec()
|
H A D | smatch.h | 78 DECLARE_PTR_LIST(stree_stack, struct stree); 88 struct stree *pool; 226 extern struct stree *global_states; 373 struct stree *get_all_states_from_stree(int owner, struct stree *source); 374 struct stree *get_all_states_stree(int id); 375 struct stree *__get_cur_stree(void); 595 …t_implications(struct expression *expr, int param, char *key, char *value, struct stree **implied); 596 struct stree *__implied_case_stree(struct expression *switch_expr, 599 struct stree **raw_stree); 713 struct stree *__swap_cur_stree(struct stree *stree); [all …]
|
H A D | smatch_param_cleared.c | 75 struct stree *stree; in print_return_value_param() local 80 stree = __get_cur_stree(); in print_return_value_param() 82 FOR_EACH_MY_SM(my_id, stree, sm) { in print_return_value_param()
|
H A D | smatch_db.c | 598 struct stree *final_states; 890 …nt_struct_members(struct expression *call, struct expression *expr, int param, struct stree *stree, in print_struct_members() argument 921 FOR_EACH_SM(stree, sm) { in print_struct_members() 974 struct stree *stree; in match_call_info() local 983 stree = get_all_states_stree(cb->owner); in match_call_info() 986 print_struct_members(call, arg, i, stree, cb->callback, 0); in match_call_info() 989 free_stree(&stree); in match_call_info() 999 struct stree *stree; in match_call_info_new() local 1008 stree = get_all_states_stree(cb->owner); in match_call_info_new() 1011 print_struct_members(call, arg, i, stree, cb->callback, 1); in match_call_info_new() [all …]
|
H A D | check_leaks.c | 228 struct stree *stree; in check_for_allocated() local 231 stree = __get_cur_stree(); in check_for_allocated() 232 FOR_EACH_MY_SM(my_id, stree, tmp) { in check_for_allocated()
|
H A D | check_unwind.c | 136 struct stree *stree; in match_return() local 149 stree = __get_cur_stree(); in match_return() 150 FOR_EACH_MY_SM(my_id, stree, tmp) { in match_return()
|
H A D | smatch_start_states.c | 29 static struct stree *start_states; 53 struct stree *get_start_states(void) in get_start_states()
|
/illumos-gate/usr/src/lib/libcmdutils/common/ |
H A D | avltree.c | 162 add_tnode(avl_tree_t **stree, dev_t device, ino_t inode) in add_tnode() argument 171 if (*stree == NULL) { in add_tnode() 172 if ((*stree = calloc(1, sizeof (avl_tree_t))) in add_tnode() 176 avl_create(*stree, in add_tnode() 190 if (avl_find(*stree, tnode, &where) == NULL) { in add_tnode() 191 avl_insert(*stree, tnode, where); in add_tnode() 204 destroy_tree(avl_tree_t *stree) in destroy_tree() argument 209 if (stree != NULL) { in destroy_tree() 212 while ((tnode = avl_destroy_nodes(stree, &cookie)) != NULL) { in destroy_tree() 215 avl_destroy(stree); in destroy_tree() [all …]
|
/illumos-gate/usr/src/lib/libslp/clib/ |
H A D | SLPUtils.c | 65 void *stree = NULL; in SLPFindScopes() local 97 &stree, &collator, &numResults); in SLPFindScopes() 101 &stree, &collator, &numResults); in SLPFindScopes() 109 if (!stree) { in SLPFindScopes() 110 (void) SAAdvert_for_scopes(hSLP, &stree); in SLPFindScopes() 113 if (!stree) { in SLPFindScopes() 123 slp_twalk(stree, collect_scopes, 0, (void *) ppcScopes); in SLPFindScopes() 178 SLPError err, void **stree) { in saadvert_callback() argument 199 (void *) ascope, stree, in saadvert_callback() 214 static SLPError SAAdvert_for_scopes(SLPHandle hSLP, void **stree) { in SAAdvert_for_scopes() argument [all …]
|