Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

2 Zero-size types result in a harness with the same name #2509

Closed
YoshikiTakashima opened this issue Jun 8, 2023 · 2 comments · Fixed by #2513
Closed

2 Zero-size types result in a harness with the same name #2509

YoshikiTakashima opened this issue Jun 8, 2023 · 2 comments · Fixed by #2513
Assignees
Labels
[C] Bug This is a bug. Something isn't working.

Comments

@YoshikiTakashima
Copy link
Contributor

YoshikiTakashima commented Jun 8, 2023

I tried this code:

//!file.rs

//! This checks that Kani zero-size playback, 2 of them in a row.

#[kani::proof]
fn any_is_ok() {
    let unit: () = kani::any();
    let unit2: () = kani::any();
    kani::cover!(unit == ());
    kani::cover!(unit2 == ());
}

using the following command line invocation:

kani file.rs -Z concrete-playback --concrete-playback=inplace
kani playback -Z concrete-playback file.rs -- kani_concrete_playback

with Kani version:

I expected to see this happen: I expected 2 independently named harnesses to be injected.

Instead, this happened: the 2 harnesses have the same name. Probably
because we did not move in the index.

After discussion, we should Inject 1 harness deduplicated.

@YoshikiTakashima YoshikiTakashima added the [C] Bug This is a bug. Something isn't working. label Jun 8, 2023
@YoshikiTakashima YoshikiTakashima self-assigned this Jun 8, 2023
YoshikiTakashima pushed a commit to YoshikiTakashima/kani that referenced this issue Jun 8, 2023
@YoshikiTakashima
Copy link
Contributor Author

This should've been caught in #2496, but was not.

@celinval
Copy link
Contributor

celinval commented Jun 9, 2023

Why do you expect two different harnesses?

@YoshikiTakashima YoshikiTakashima moved this from Todo to In Progress in Kani 2023-06-19 Jun 9, 2023
@YoshikiTakashima YoshikiTakashima moved this from In Progress to Todo in Kani 2023-06-19 Jun 9, 2023
@YoshikiTakashima YoshikiTakashima moved this from Todo to Done in Kani 2023-06-19 Jun 9, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
[C] Bug This is a bug. Something isn't working.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants