Skip to content

"--cover and --unwinding-assertions must not be given together" #6561

Open
@tedinski

Description

@tedinski

CBMC version: latest / any / 5.43
Operating system: any
Exact command line resulting in the issue: cbmc --unwinding-assertions --cover location ...
What behaviour did you expect: CBMC would run and give me coverage information
What happened instead: Failed to run with the error "--cover and --unwinding-assertions must not be given together"

Use case: RMC has a default set of flags that we pass to CBMC that includes --unwinding-assertions to enforce soundness. To use cbmc-viewer we need three runs of cbmc using (1) --trace (2) --cover location (3) --show-properties.

I acknowledge that the "correct" fix here is to break up our default set of flags into groups that are appropriate for each invocation of cbmc. (We're clearly enabling too much redundant work right now by turning on a bunch of default assertions for the coverage invocation.) But I initially just tried cbmc <default-args> <additional flag> and was perplexed by this error.

I don't understand why this combination of flags is disallowed. If I look back through commit history, I see the original introduction here:

b200bbd

But this initially just silently disables unwinding-assertions when cover is enabled, (perhaps because they're harmlessly redundant?) This turned into an error here:

#2049

But I'm not sure this combination should be disallowed at all. Is there any harm in instrumenting both of these assertions at the same time? (I haven't investigated, but this might be the only meaningful obstacle to getting failure and coverage in one run of cbmc instead of needing two, and that might be an even more "correct" fix...)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions