Home
last modified time | relevance | path

Searched refs:size_expr (Results 1 – 6 of 6) sorted by relevance

/illumos-gate/usr/src/tools/smatch/src/
H A Dcheck_access_ok_math.c47 static void match_size(struct expression *size_expr) in match_size() argument
51 size_expr = strip_expr(size_expr); in match_size()
52 if (!size_expr) in match_size()
54 if (size_expr->type != EXPR_BINOP) { in match_size()
55 size_expr = get_assigned_expr(size_expr); in match_size()
56 if (!size_expr || size_expr->type != EXPR_BINOP) in match_size()
59 if (!can_overflow(size_expr)) in match_size()
62 name = expr_to_str(size_expr); in match_size()
70 struct expression *size_expr; in match_access_ok() local
72 size_expr = get_argument_from_call_expr(expr->args, 1); in match_access_ok()
[all …]
H A Dcheck_buffer_too_small_for_struct.c27 struct expression *size_expr; in match_assign() local
52 size_expr = get_size_variable(expr->right, &limit_type); in match_assign()
53 if (!size_expr) in match_assign()
58 get_absolute_min(size_expr, &min_size); in match_assign()
71 struct expression *size_expr; in match_dereferences() local
91 size_expr = get_size_variable(right, &limit_type); in match_dereferences()
92 if (!size_expr) in match_dereferences()
97 get_absolute_min(size_expr, &min_size); in match_dereferences()
H A Dcheck_kmalloc_wrong_size.c35 static void check_size_matches(int data_size, struct expression *size_expr) in check_size_matches() argument
42 if (!get_implied_value(size_expr, &sval)) in check_size_matches()
H A Dsmatch_buf_comparison.c616 struct expression *size_expr; in set_param_compare() local
629 size_expr = symbol_expression(size_sym); in set_param_compare()
632 tmp = set_state_expr(size_id, array_expr, alloc_compare_size(limit_type, size_expr)); in set_param_compare()
635 set_state_expr(link_id, size_expr, alloc_state_expr(array_expr)); in set_param_compare()
640 struct expression *size_expr; in set_implied() local
652 size_expr = symbol_expression(size_sym); in set_implied()
655 tmp = set_state_expr(size_id, array_expr, alloc_compare_size(limit_type, size_expr)); in set_implied()
658 set_state_expr(link_id, size_expr, alloc_state_expr(array_expr)); in set_implied()
H A Dsmatch_parse_call_math.c474 struct expression *size_expr; in match_alloc() local
478 size_expr = get_argument_from_call_expr(right->args, size_arg); in match_alloc()
480 sname = format_expr(size_expr); in match_alloc()
H A Dsmatch_buf_size.c764 struct expression *size_expr; in match_strndup() local
768 size_expr = get_argument_from_call_expr(fn_expr->args, 1); in match_strndup()
769 if (get_implied_max(size_expr, &size)) { in match_strndup()