llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.61k stars 11.82k forks source link

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

Open escherle-validas opened 3 weeks ago

escherle-validas commented 3 weeks ago

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

escherle-validas commented 16 hours ago

Since we have no reply from you yet, I would like to ask for a status update for this issue. Are there any plans how this will be handled?