Get the functions with their fuzzable parameters. Returned with the map of Function names and vectors of fuzzable parameters' positions.
()
| 1012 | /// Get the functions with their fuzzable parameters. |
| 1013 | /// Returned with the map of Function names and vectors of fuzzable parameters' positions. |
| 1014 | pub fn get_fuzzable_funcs() -> &'static HashMap<String, Vec<usize>> { |
| 1015 | static FUNCS: OnceCell<HashMap<String, Vec<usize>>> = OnceCell::new(); |
| 1016 | FUNCS.get_or_init(|| { |
| 1017 | let mut funcs: HashMap<String, Vec<usize>> = HashMap::new(); |
| 1018 | for gadget in get_func_gadgets() { |
| 1019 | let name = gadget.name.clone(); |
| 1020 | let param_pos = gadget.get_fuzzable_params(); |
| 1021 | funcs.insert(name, param_pos); |
| 1022 | } |
| 1023 | funcs |
| 1024 | }) |
| 1025 | } |
| 1026 | |
| 1027 | #[cfg(test)] |
| 1028 | mod tests { |