Home
last modified time | relevance | path

Searched refs:sval (Results 1 – 25 of 115) sorted by relevance

12345

/illumos-gate/usr/src/tools/smatch/src/
H A Dsmatch_sval.c40 *ret = sval; in sval_alloc()
49 *ret = sval; in sval_alloc_permanent()
222 if (sval_signed(sval) && sval.value == SHRT_MIN) in sval_is_a_min()
224 if (sval_signed(sval) && sval.value == INT_MIN) in sval_is_a_min()
226 if (sval_signed(sval) && sval.value == LLONG_MIN) in sval_is_a_min()
448 sval.value = !sval.value; in sval_preop()
451 sval.value = ~sval.value; in sval_preop()
452 sval = sval_cast(sval.type, sval); in sval_preop()
455 sval.value = -sval.value; in sval_preop()
456 sval = sval_cast(sval.type, sval); in sval_preop()
[all …]
H A Dsmatch_math.c96 sval_t sval; in handle_address() local
165 if (!sval.type && !rl_to_sval(rl, &sval)) in handle_bitwise_negate()
167 sval = sval_preop(sval, '~'); in handle_bitwise_negate()
464 *res = alloc_rl(sval, sval); in handle_mod_rl()
937 if (sval_is_negative(sval) && sval_is_min(sval)) in get_fuzzy_min_helper()
1352 rl = rl_binop(rl, '*', alloc_rl(sval, sval)); in get_offset_from_down()
1354 *res = rl_binop(rl, '+', alloc_rl(sval, sval)); in get_offset_from_down()
1502 *res = alloc_rl(sval, sval); in get_rl_internal()
1515 *res = alloc_rl(sval, sval); in get_rl_helper()
1523 *res = alloc_rl(sval, sval); in get_rl_helper()
[all …]
H A Dsmatch_buf_size.c65 sval_t sval; in estate_to_size() local
90 return alloc_rl(sval, sval); in size_to_rl()
280 if (rl_to_sval(rl, &sval) && sval.value == 0) in db_returns_buf_size()
418 if (sval.value != 0 && sval.value != 1) in last_member_is_resizable()
470 return alloc_rl(sval, sval); in alloc_int_rl()
534 if (rl_to_sval(ret, &sval) && sval.value == -1) in get_array_size_bytes_rl()
789 if (sval.value < 0 || sval.value > 10) in match_alloc_pages()
793 sval.value = 1 << sval.value; in match_alloc_pages()
796 store_alloc(expr->left, alloc_rl(sval, sval)); in match_alloc_pages()
854 (sval.value == -1 || sval.value == 0))) in struct_member_callback()
[all …]
H A Dcheck_or_vs_and.c44 sval_t sval; in inconsistent_check() local
46 if (get_value(left->left, &sval)) { in inconsistent_check()
47 if (get_value(right->left, &sval)) in inconsistent_check()
49 if (get_value(right->right, &sval)) in inconsistent_check()
54 if (get_value(right->left, &sval)) in inconsistent_check()
143 sval_t sval; in match_condition() local
148 if (get_value(expr->left, &sval) || get_value(expr->right, &sval)) in match_condition()
161 if ((get_value(expr->left, &sval) && sval.value == 0) || in match_condition()
162 (get_value(expr->right, &sval) && sval.value == 0)) in match_condition()
168 sval_t left, right, sval; in match_binop() local
[all …]
H A Dcheck_impossible_mask.c25 sval_t sval;
32 if (get_implied_value(expr, &sval))
33 return sval.uvalue;
50 get_absolute_max(expr, &sval);
51 ret = sval.value;
66 sval_t sval; in get_possible_bits() local
73 if (!get_implied_value(expr->right, &sval)) in get_possible_bits()
76 return sval.uvalue; in get_possible_bits()
82 sval_t sval; in match_condition() local
95 if (!get_value(expr->right, &sval)) in match_condition()
[all …]
H A Dsmatch_mtag.c97 sval_t sval; in get_allocator_info() local
236 sval_t sval; in get_array_mtag_offset() local
267 sval_t sval; in swap_mtag_seed() local
270 if (!rl_to_sval(rl, &sval)) in swap_mtag_seed()
272 if (sval.type->type != SYM_PTR || sval.uvalue != MTAG_SEED) in swap_mtag_seed()
279 sval.value = tag; in swap_mtag_seed()
280 return alloc_rl(sval, sval); in swap_mtag_seed()
314 sval_t sval; in get_implied_mtag_offset() local
320 if (!state || !estate_get_single_value(state, &sval) || sval.value == 0) in get_implied_mtag_offset()
450 sval->type = type; in get_mtag_sval()
[all …]
H A Dsmatch_strlen.c38 sval_t sval; in size_to_estate() local
40 sval.type = &int_ctype; in size_to_estate()
41 sval.value = size; in size_to_estate()
43 return alloc_estate_sval(sval); in size_to_estate()
102 sval_t sval; in match_strlen_condition() local
129 if (!get_value(right, &sval)) in match_strlen_condition()
133 if (!get_value(left, &sval)) in match_strlen_condition()
144 true_state = size_to_estate(sval.value); in match_strlen_condition()
147 true_state = size_to_estate(sval.value); in match_strlen_condition()
225 sval_t sval; in get_strlen_from_string() local
[all …]
H A Dsmatch_mtag_map.c34 sval_t sval; in match_assign() local
44 if (!get_implied_value(right, &sval)) in match_assign()
46 if (sval_cmp(sval, valid_ptr_min_sval) < 0 || in match_assign()
47 sval_cmp(sval, valid_ptr_max_sval) > 0) in match_assign()
49 right_tag = sval.uvalue & ~MTAG_OFFSET_MASK; in match_assign()
50 right_offset = sval.uvalue & MTAG_OFFSET_MASK; in match_assign()
H A Dsmatch_parse_call_math.c170 sval_t sval; in read_var_num() local
178 sval.type = &llong_ctype; in read_var_num()
182 *rl = alloc_rl(sval, sval); in read_var_num()
253 if (!rl_to_sval(rl, sval)) in parse_call_math()
347 static int is_mtag_sval(sval_t sval) in is_mtag_sval() argument
349 if (!is_ptr_type(sval.type)) in is_mtag_sval()
359 sval_t sval; in format_expr_helper() local
393 if (!param_was_set(expr) && get_implied_value(expr, &sval) && !is_mtag_sval(sval)) { in format_expr_helper()
448 sval_t sval; in get_value_in_terms_of_parameter_math_var_sym() local
459 if (get_implied_value(expr, &sval)) in get_value_in_terms_of_parameter_math_var_sym()
[all …]
H A Dcheck_return_cast.c29 sval_t sval; in match_return() local
40 if (!get_fuzzy_min(ret_value, &sval)) in match_return()
42 if (sval_is_positive(sval) || sval_cmp_val(sval, -1) == 0) in match_return()
45 sm_warning("signedness bug returning '%s'", sval_to_str(sval)); in match_return()
H A Dcheck_index_overflow.c30 sval_t sval; in definitely_just_used_as_limiter() local
33 if (!get_implied_value(offset, &sval)) in definitely_just_used_as_limiter()
35 if (get_array_size(array) != sval.value) in definitely_just_used_as_limiter()
51 if (!get_hard_max(expr, sval)) in fake_get_hard_max()
64 sval_cmp(rl_max(implied_rl), *sval) < 0) in fake_get_hard_max()
65 *sval = rl_max(implied_rl); in fake_get_hard_max()
69 static int get_the_max(struct expression *expr, sval_t *sval) in get_the_max() argument
73 if (get_hard_max(expr, sval)) { in get_the_max()
86 sval_cmp(rl_max(implied_rl), *sval) < 0) in get_the_max()
87 *sval = rl_max(implied_rl); in get_the_max()
[all …]
H A Dsmatch_constraints_required.c134 sval_t sval; in handle_zero_size_arrays() local
139 if (get_implied_value(mult_left, &sval) && in handle_zero_size_arrays()
140 sval.value == type_bytes(array_type)) in handle_zero_size_arrays()
143 sval.value == type_bytes(array_type)) in handle_zero_size_arrays()
166 sval_t sval; in match_alloc_helper() local
196 if (get_implied_value(mult_left, &sval) && in match_alloc_helper()
207 get_implied_value(size->right, &sval) && in match_alloc_helper()
208 sval.value == 1) in match_alloc_helper()
230 sval_t sval; in match_calloc() local
236 if (get_implied_value(size, &sval) && in match_calloc()
[all …]
H A Dsmatch_capped.c97 sval_t sval; in is_capped() local
150 sval_t sval; in match_condition() local
163 if (get_implied_value(left, &sval) || in match_condition()
164 get_implied_value(right, &sval)) in match_condition()
222 sval_t sval; in match_caller_info() local
228 if (get_implied_value(tmp, &sval)) in match_caller_info()
239 sval_t sval; in struct_member_callback() local
244 if (estate_get_single_value(estate, &sval)) in struct_member_callback()
257 sval_t sval; in print_return_implies_capped() local
273 if (estate_get_single_value(estate, &sval)) in print_return_implies_capped()
[all …]
H A Dcheck_allocating_enough_data.c25 sval_t sval; in db_returns_buf_size() local
37 if (!parse_call_math(call, math, &sval) || sval.value == 0) in db_returns_buf_size()
44 if (sval.uvalue >= bytes) in db_returns_buf_size()
48 sm_error("not allocating enough for = '%s' %d vs %s", str, bytes, sval_to_str(sval)); in db_returns_buf_size()
H A Dcheck_debug.c122 sval_t sval; in match_print_known() local
125 if (get_value(arg, &sval)) in match_print_known()
166 sval_t sval; in match_print_implied_min() local
183 sval_t sval; in match_print_implied_max() local
232 sval_t sval; in match_print_hard_max() local
249 sval_t sval; in match_print_fuzzy_max() local
281 sval_t sval; in match_print_absolute_min() local
298 sval_t sval; in match_print_absolute_max() local
312 sval_t sval; in match_sval_info() local
323 …("implied: %s %c%d ->value = %llx", name, sval_unsigned(sval) ? 'u' : 's', sval_bits(sval), sval.v… in match_sval_info()
[all …]
H A Dcheck_logical_instead_of_bitwise.c36 sval_t sval; in match_logic() local
44 if (!get_value(expr->right, &sval)) { in match_logic()
45 if (!get_value(expr->left, &sval)) in match_logic()
49 if (sval.value == 0 || sval.value == 1) in match_logic()
H A Dcheck_string_len.c44 sval_t sval; in handle_format() local
145 get_absolute_max(arg, &sval); in handle_format()
147 get_absolute_min(arg, &sval); in handle_format()
148 if (sval_is_negative(sval)) in handle_format()
149 sval.value = 0; in handle_format()
154 ret = snprintf(buf, sizeof(buf), "%llx", sval.uvalue); in handle_format()
156 ret = snprintf(buf, sizeof(buf), "%llu", sval.uvalue); in handle_format()
161 ret = snprintf(buf, sizeof(buf), "%lld", sval.value); in handle_format()
167 ret = snprintf(buf, sizeof(buf), "%lld", sval.value); in handle_format()
H A Dcheck_return_enomem.c33 sval_t sval; in match_return() local
41 if (!get_value(ret_value, &sval) || sval.value != -1) in match_return()
49 if (!estate_get_single_value(sm->state, &sval) || sval.value != 0) in match_return()
H A Dcheck_signed.c37 sval_t sval; in match_assign() local
54 if (!get_implied_value(expr->right, &sval)) in match_assign()
58 sval_cmp(max, sval) < 0 && in match_assign()
59 !(sval.value < 256 && max.value == 127)) { in match_assign()
63 right_name, sval_to_numstr(sval), sval_to_numstr(max), left_name); in match_assign()
67 if (sval_cmp_t(&llong_ctype, min, sval) > 0) { in match_assign()
68 if (min.value == 0 && sval.value == -1) /* assigning -1 to unsigned variables is idiomatic */ in match_assign()
74 if (sval_positive_bits(sval) == 7) in match_assign()
79 sval_to_str(sval), left_name); in match_assign()
82 sval_to_str(sval), sval_to_str(min), left_name); in match_assign()
H A Dcheck_capable.c29 sval_t sval; in match_capable() local
33 if (!get_implied_value(arg, &sval)) in match_capable()
35 snprintf(buf, sizeof(buf), "%s", sval_to_str(sval)); in match_capable()
42 sval_t sval; in match_ns_capable() local
49 if (!get_implied_value(arg, &sval)) in match_ns_capable()
51 snprintf(buf, sizeof(buf), "%s", sval_to_str(sval)); in match_ns_capable()
H A Dcheck_gfp_dma.c33 sval_t sval; in match_alloc() local
36 if (!get_value(arg_expr, &sval)) in match_alloc()
38 if (sval.uvalue == 0) /* GFP_NOWAIT */ in match_alloc()
40 if (!(sval.uvalue & ~GFP_ZONEMASK)) in match_alloc()
/illumos-gate/usr/src/cmd/awk/
H A Dtran.c108 if (&vp->sval == FS || &vp->sval == RS || in setfree()
109 &vp->sval == OFS || &vp->sval == ORS || in setfree()
110 &vp->sval == OFMT || &vp->sval == CONVFMT || in setfree()
111 &vp->sval == FILENAME || &vp->sval == SUBSEP) in setfree()
133 FS = &fsloc->sval; in syminit()
135 RS = &rsloc->sval; in syminit()
243 xfree(cp->sval); in freesymtab()
275 xfree(p->sval); in freeelem()
437 xfree(vp->sval); in setsval()
445 vp->sval = t; in setsval()
[all …]
H A Dlib.c106 fldtab[0]->sval = record; in recinit()
221 xfree(recloc->sval); in getrec()
374 if (is_number(q->sval)) { in setclvar()
396 r = fldtab[0]->sval; in fldbld()
421 fldtab[i]->sval = fr; in fldbld()
461 fldtab[i]->sval = fr; in fldbld()
506 xfree(p->sval); in cleanfld()
507 p->sval = ""; in cleanfld()
597 fldtab[i]->sval = fr; in refldbld()
642 xfree(recloc->sval); in recbld()
[all …]
/illumos-gate/usr/src/cmd/oawk/
H A Dtran.c86 symtab)->sval; in syminit()
88 symtab)->sval; in syminit()
122 tp = (CELL **) ap->sval; in freesymtab()
127 xfree(cp->sval); in freesymtab()
153 p->sval = s; in setsymtab()
250 xfree(vp->sval); in setsval()
274 if (isanumber(vp->sval)) { in getfval()
275 vp->fval = watof(vp->sval); in getfval()
305 xfree(vp->sval); in getsval()
311 vp->sval = tostring(ws); in getsval()
[all …]
/illumos-gate/usr/src/test/libc-tests/tests/
H A Dstrcoll-strxfrm-6907.c35 char sval[MAXSTRLEN]; member
58 p = data[i].sval; in main()
93 if (strxfrm(data[i].xval, data[i].sval, in main()
96 "exceeded %d bytes", (int)strlen(data[i].sval), in main()
106 int sr = strcoll(data[i].sval, data[j].sval); in main()
111 curloc, data[i].sval, data[j].sval); in main()

12345