Skip to content

[llvm-cov][MC/DC][Qualification] Too High MCDC coverage for C++  #109940

Open
@escherle-validas

Description

@escherle-validas

Too High MCDC coverage for C++

Criticality: HIGH

During qualification of MCDC coverage at Validas we found that
the computation of MCDC coverage for the term "if ((TRUE ||TRUE) && v2)" is too high.
The result is 100%, but should be 33% (or 50% or 66% depending on the interpretation of folded constants).
This is highly critical, since tester might think they have covered everything and do not optimize the code.
When we run the same example using Rust, we see 50% coverage, which is different and safe.

Rust example:
constant_folding_rust
Source Code and generated Reports:
Test_000005.zip

C++ example:
constant_folding_cpp
Source Code and generated Reports:
Test_000005.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions