Print this page
new smatch

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/smatch/src/smatch_extra.h
          +++ new/usr/src/tools/smatch/src/smatch_extra.h
↓ open down ↓ 23 lines elided ↑ open up ↑
  24   24  };
  25   25  
  26   26  DECLARE_PTR_LIST(related_list, struct relation);
  27   27  
  28   28  struct data_info {
  29   29          struct related_list *related;
  30   30          struct range_list *value_ranges;
  31   31          sval_t fuzzy_max;
  32   32          unsigned int hard_max:1;
  33   33          unsigned int capped:1;
       34 +        unsigned int treat_untagged:1;
  34   35  };
  35   36  DECLARE_ALLOCATOR(data_info);
  36   37  
  37   38  extern struct string_list *__ignored_macros;
  38   39  
  39   40  /* these are implemented in smatch_ranges.c */
  40   41  struct range_list *rl_zero(void);
  41   42  struct range_list *rl_one(void);
  42   43  char *show_rl(struct range_list *list);
  43   44  int str_to_comparison_arg(const char *c, struct expression *call, int *comparison, struct expression **arg);
↓ open down ↓ 22 lines elided ↑ open up ↑
  66   67  int possibly_true_rl(struct range_list *left_ranges, int comparison, struct range_list *right_ranges);
  67   68  int possibly_true_rl_LR(int comparison, struct range_list *a, struct range_list *b, int left);
  68   69  
  69   70  int possibly_false(struct expression *left, int comparison, struct expression *right);
  70   71  int possibly_false_rl(struct range_list *left_ranges, int comparison, struct range_list *right_ranges);
  71   72  int possibly_false_rl_LR(int comparison, struct range_list *a, struct range_list *b, int left);
  72   73  
  73   74  int rl_has_sval(struct range_list *rl, sval_t sval);
  74   75  int ranges_equiv(struct data_range *one, struct data_range *two);
  75   76  
       77 +bool is_err_ptr(sval_t sval);
       78 +
  76   79  int rl_equiv(struct range_list *one, struct range_list *two);
  77   80  int is_whole_rl(struct range_list *rl);
  78   81  int is_unknown_ptr(struct range_list *rl);
  79   82  int is_whole_rl_non_zero(struct range_list *rl);
  80   83  int estate_is_unknown(struct smatch_state *state);
  81   84  
  82   85  sval_t rl_min(struct range_list *rl);
  83   86  sval_t rl_max(struct range_list *rl);
  84   87  int rl_to_sval(struct range_list *rl, sval_t *sval);
  85   88  struct symbol *rl_type(struct range_list *rl);
↓ open down ↓ 53 lines elided ↑ open up ↑
 139  142  sval_t estate_get_fuzzy_max(struct smatch_state *state);
 140  143  void estate_set_fuzzy_max(struct smatch_state *state, sval_t max);
 141  144  void estate_copy_fuzzy_max(struct smatch_state *new, struct smatch_state *old);
 142  145  void estate_clear_fuzzy_max(struct smatch_state *state);
 143  146  int estate_has_hard_max(struct smatch_state *state);
 144  147  void estate_set_hard_max(struct smatch_state *state);
 145  148  void estate_clear_hard_max(struct smatch_state *state);
 146  149  int estate_get_hard_max(struct smatch_state *state, sval_t *sval);
 147  150  bool estate_capped(struct smatch_state *state);
 148  151  void estate_set_capped(struct smatch_state *state);
      152 +bool estate_treat_untagged(struct smatch_state *state);
      153 +void estate_set_treat_untagged(struct smatch_state *state);
 149  154  
 150  155  int estate_get_single_value(struct smatch_state *state, sval_t *sval);
 151  156  struct smatch_state *get_implied_estate(struct expression *expr);
 152  157  
 153  158  struct smatch_state *estate_filter_sval(struct smatch_state *orig, sval_t filter);
 154  159  struct data_info *clone_dinfo_perm(struct data_info *dinfo);
 155  160  struct smatch_state *clone_estate_perm(struct smatch_state *state);
 156  161  
 157  162  /* smatch_extra.c */
 158  163  bool is_impossible_variable(struct expression *expr);
↓ open down ↓ 45 lines elided ↑ open up ↑
 204  209  struct expression *preop_expression(struct expression *expr, int op);
 205  210  struct expression *deref_expression(struct expression *expr);
 206  211  struct expression *assign_expression(struct expression *left, int op, struct expression *right);
 207  212  struct expression *binop_expression(struct expression *left, int op, struct expression *right);
 208  213  struct expression *array_element_expression(struct expression *array, struct expression *offset);
 209  214  struct expression *symbol_expression(struct symbol *sym);
 210  215  struct expression *string_expression(char *str);
 211  216  struct expression *compare_expression(struct expression *left, int op, struct expression *right);
 212  217  struct expression *unknown_value_expression(struct expression *expr);
 213  218  int is_fake_call(struct expression *expr);
      219 +struct expression *gen_expression_from_name_sym(const char *name, struct symbol *sym);
 214  220  struct expression *gen_expression_from_key(struct expression *arg, const char *key);
 215  221  void free_tmp_expressions(void);
 216  222  void expr_set_parent_expr(struct expression *expr, struct expression *parent);
 217  223  void expr_set_parent_stmt(struct expression *expr, struct statement *parent);
 218  224  struct expression *expr_get_parent_expr(struct expression *expr);
 219  225  struct statement *expr_get_parent_stmt(struct expression *expr);
 220  226  
 221  227  /* smatch_param_limit.c */
 222  228  struct smatch_state *get_orig_estate(const char *name, struct symbol *sym);
 223  229  
 224  230  /* smatch_real_absolute.c */
 225  231  struct smatch_state *get_real_absolute_state(struct expression *expr);
 226  232  struct smatch_state *get_real_absolute_state_var_sym(const char *name, struct symbol *sym);
 227  233  
 228  234  /* smatch_imaginary_absolute.c */
 229  235  void __save_imaginary_state(struct expression *expr, struct range_list *true_rl, struct range_list *false_rl);
 230  236  int get_imaginary_absolute(struct expression *expr, struct range_list **rl);
 231  237  
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX