mutagen
mutagen copied to clipboard
need to child.kill() when returning Status::Timeout in runner
I noticed a few comments along the lines of trying to avoid mutating into infinite loops. While of course this is good to avoid too many spurious too-weak mutations, it's kind of theoretically impossible in general. The current implementation leaks processes that consume 100% CPU forever.
It's easy to fix, as described in the title.
I ran into this with the following test case.
#[mutate]
fn finite_loop() -> usize {
let mut x = Some(true);
let mut n = 0;
while x.is_some() {
if x.unwrap() { // REPLACE_WITH_TRUE here triggers it
x = Some(false);
} else {
x = None;
}
n += 1;
}
n
}