Skip to content

[llvm-cov][MC/DC][Qualification] Constant folding yields too high MCDC coverage (Rust) #109944

Open
@escherle-validas

Description

@escherle-validas

Constant folding yields too high MCDC coverage (Rust)

Criticality: MEDIUM

During qualification of MCDC coverage at Validas we found that
constant folding produces wrong (too high) coverage results in case of incomplete coverage.
In the following example where the term "(true || true) && v2" contains constants we would
expect that 1 / 3 atoms are covered (= 33.3 % MCDC), but LLVM Cov measures 50 % MCDC.
Since coverage is less than 100% a manual analysis and explanation is required, therefore the safety cirticality is not high.
Note: For the same example in C++ 100 % MCDC is measured by llvm-cov (see #109940)

constant_folding_rust

Example Source Code:
Test_000005.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions