Skip to content

need to child.kill() when returning Status::Timeout in runner #146

Open

Description

@bblum

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
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions