Whether this ty is array and is able to receive fuzzer's mutable bytes (considered as fuzzable). 1. must be const qualified array. 2. the array elements must be primitive types.
(ty: &str)
| 861 | /// 1. must be const qualified array. |
| 862 | /// 2. the array elements must be primitive types. |
| 863 | pub fn is_fuzzable_array_ty(ty: &str) -> bool { |
| 864 | if is_const_pointer_ty(ty) { |
| 865 | let inner = get_pointer_inner(ty).expect("expect not fail."); |
| 866 | if is_primitive_type(inner) { |
| 867 | return true; |
| 868 | } |
| 869 | if !is_const_pointer_ty(inner) { |
| 870 | return false; |
| 871 | } |
| 872 | // only consider a maximal depth of 2. |
| 873 | let inner = get_pointer_inner(inner).expect("expect not fail."); |
| 874 | if is_primitive_type(inner) { |
| 875 | return true; |
| 876 | } |
| 877 | } |
| 878 | false |
| 879 | } |
| 880 | |
| 881 | fn get_integer_ty_identifier(ty: &str) -> &str { |
| 882 | match ty { |
no test coverage detected