Skip to content

Visualize incorrectly reports all lines covered #2048

@zhassan-aws

Description

@zhassan-aws

I tried this code:

#[kani::proof]
fn main() {
    let x: u8 = kani::any();
    if x > 5 {
        if x < 2 {
            let y = x;
        }
    } else {
        assert!(x < 10);
    }
}

using the following command line invocation:

kani test.rs --visualize

with Kani version: 0.18.0

I expected to see this happen: Coverage is not 100% as line 6 is unreachable due to the contradicting conditions.

Instead, this happened: The report from visualize says all lines are reachable:

image

Line 6 is displayed in orange (as well as line 5!) rather than red:

image

Metadata

Metadata

Assignees

Labels

[C] BugThis is a bug. Something isn't working.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions