(
constraints: &APIConstraints,
call_name: &str,
arg_pos: &usize,
)
| 1428 | } |
| 1429 | |
| 1430 | fn get_array_arg_constraint( |
| 1431 | constraints: &APIConstraints, |
| 1432 | call_name: &str, |
| 1433 | arg_pos: &usize, |
| 1434 | ) -> Option<Constraint> { |
| 1435 | if let Some(func_constraints) = constraints.get(call_name) { |
| 1436 | for constraint in func_constraints { |
| 1437 | if let crate::program::infer::Constraint::ArrayLen((array_pos, _)) = constraint { |
| 1438 | if array_pos == arg_pos { |
| 1439 | return Some(constraint.clone()); |
| 1440 | } |
| 1441 | } |
| 1442 | if let crate::program::infer::Constraint::WeakArrayLen((array_pos, _)) = constraint { |
| 1443 | if array_pos == arg_pos { |
| 1444 | return Some(constraint.clone()); |
| 1445 | } |
| 1446 | } |
| 1447 | if let crate::program::infer::Constraint::ArrayIndex((array_pos, _)) = constraint { |
| 1448 | if array_pos == arg_pos { |
| 1449 | return Some(constraint.clone()); |
| 1450 | } |
| 1451 | } |
| 1452 | } |
| 1453 | } |
| 1454 | None |
| 1455 | } |
| 1456 | |
| 1457 | // those args are constrained, we don't rand mutate those args. |
| 1458 | fn filter_constrained_integer_args( |
no outgoing calls
no test coverage detected