model-checking / cbmc-viewer

CBMC Viewer scans the output of CBMC and produces a browsable summary of its findings, making it easy to root cause the issues it finds.
https://model-checking.github.io/cbmc-viewer/
Apache License 2.0
32 stars 11 forks source link

Skip malformed coverage data #136

Closed markrtuttle closed 1 year ago

markrtuttle commented 1 year ago

This patch modifies viewer to skip and log malformed coverage data found in cbmc coverage output, and to log a message to the console warning the user that coverage data has been skipped and coverage results may not be correct:

WARNING: Skipping malformed coverage data in coverage.xml.
WARNING: Use the --verbose to see what coverage data was skipped.

For a source location without a function name, the verbose flag produces

INFO: Skipping malformed source location in coverage goal: Found file:file.c function: line:72
INFO: Skipping malformed source location in coverage goal description: block 1 (lines file.c::72): Found file:file.c function: line:72

Review this pull request commit-by-commit to make the changes easy to see and understand.

Resolves https://github.com/model-checking/cbmc-viewer/issues/134

feliperodri commented 1 year ago

Are you debugging the CI failures? They are not requested for merge, buying can't tell if they are from this code change.