cranelift: CLIF Fuzzer generate multiple blocks

This commit is contained in:
Afonso Bordado
2021-07-05 21:23:54 +01:00
parent fb1201cb60
commit f4bd7d17a3
2 changed files with 137 additions and 28 deletions

View File

@@ -9,6 +9,13 @@ pub struct Config {
/// Number of variables that we allocate per function
/// This value does not include the signature params
pub vars_per_function: RangeInclusive<usize>,
/// Number of blocks that we generate per function.
/// This value does not include the entry block
pub blocks_per_function: RangeInclusive<usize>,
/// Number of params a block should take
/// This value does not apply to block0 which takes the function params
/// and is thus governed by `signature_params`
pub block_signature_params: RangeInclusive<usize>,
}
impl Default for Config {
@@ -19,6 +26,8 @@ impl Default for Config {
signature_rets: 0..=16,
instructions_per_block: 0..=64,
vars_per_function: 0..=16,
blocks_per_function: 0..=16,
block_signature_params: 0..=16,
}
}
}