fuzzgen: Mostly Forward Branching (#4894)
* cranelift: Test Forward branching * fuzzgen: Separate terminators * fuzzgen: Avoid generating jumptables if we have no valid targets * fuzzgen: Forward Jump Tables * fuzzgen: Cleanup some feedback Thanks @jameysharp! * fuzzgen: Cleanup block generation Thanks @jameysharp! * fuzzgen: Style Cleanups These were accidentally reverted in a rebase * fuzzgen: Prevent block0 from being targeted for branches * fuzzgen: Add jump tables sorting TODO
This commit is contained in:
@@ -35,6 +35,10 @@ pub struct Config {
|
||||
pub static_stack_slots_per_function: RangeInclusive<usize>,
|
||||
/// Size in bytes
|
||||
pub static_stack_slot_size: RangeInclusive<usize>,
|
||||
|
||||
/// Determines how often we generate a backwards branch
|
||||
/// Backwards branches are prone to infinite loops, and thus cause timeouts.
|
||||
pub backwards_branch_ratio: (usize, usize),
|
||||
}
|
||||
|
||||
impl Default for Config {
|
||||
@@ -55,6 +59,9 @@ impl Default for Config {
|
||||
funcrefs_per_function: 0..=8,
|
||||
static_stack_slots_per_function: 0..=8,
|
||||
static_stack_slot_size: 0..=128,
|
||||
// 0.1% allows us to explore this, while not causing enough timeouts to significantly
|
||||
// impact execs/s
|
||||
backwards_branch_ratio: (1, 1000),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user