-
Notifications
You must be signed in to change notification settings - Fork 97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Spurious failure with rust toolchain-2022-12-11 #2051
Comments
This branch contains a minimized example that reproduces the spurious failure: https://github.com/zhassan-aws/s2n-quic/tree/kani-iss2051 The breaking change was introduced in the
$ git diff
diff --git a/kani-compiler/src/kani_middle/coercion.rs b/kani-compiler/src/kani_middle/coercion.rs
index a92c2f366ae..799ba3b4766 100644
--- a/kani-compiler/src/kani_middle/coercion.rs
+++ b/kani-compiler/src/kani_middle/coercion.rs
@@ -215,7 +215,7 @@ fn custom_coerce_unsize_info<'tcx>(
let trait_ref = ty::Binder::dummy(TraitRef {
def_id,
- substs: tcx.mk_substs_trait(source_ty, &[target_ty.into()]),
+ substs: tcx.mk_substs_trait(source_ty, [target_ty.into()]),
});
match tcx.codegen_select_candidate((ParamEnv::reveal_all(), trait_ref)) {
diff --git a/rust-toolchain.toml b/rust-toolchain.toml
index 0fb3d8fbb64..f342c79ab3a 100644
--- a/rust-toolchain.toml
+++ b/rust-toolchain.toml
@@ -2,5 +2,5 @@
# SPDX-License-Identifier: Apache-2.0 OR MIT
[toolchain]
-channel = "nightly-2022-11-20"
+channel = "nightly-2022-11-24"
components = ["llvm-tools-preview", "rustc-dev", "rust-src", "rustfmt"]
This will fail with:
With the previous nightly rust toolchain (
|
The concrete playback test passes: #[test]
fn kani_concrete_playback_kani_round_trip_5132525969304926950() {
let concrete_vals: Vec<Vec<u8>> = vec![
// 4u
vec![4, 0, 0, 0]
];
kani::concrete_playback_run(concrete_vals, kani_round_trip);
} Also, if I replace |
I looked at the rust commit log between those two nightly versions with We might be seeing different type layouts before and after, and this might be exposing a buggy assumption in the kani-compiler. |
I think the important part here is "rerun Kani". I initially misread this because it was next to concrete playback stuff, but I just validated this. The failing trace says |
I'm also suspecting a CBMC bug, in particular due to those lines in the
The full report is attached. |
Looks like there's nothing wrong with the #[kani::proof]
fn main() {
let v1 = vec![1];
let v2 = vec![2];
assert_eq!(v1, v2);
}
|
This is the line of code it's pointing out: |
FWIW, the issue pointed out by |
Interestingly, the spurious failure does not occur with CBMC 5.70.0 (even with the newer toolchain):
but it occurs with CBMC 5.71.0 and 5.72.0. |
@tautschnig need your help on this one. |
Tracked by diffblue/cbmc#7462 |
diffblue/cbmc#7462 is now resolved and will be part of 5.75.0 (due 2023-01-19). |
This is a tracking issue for the failure in an
s2n-quic
harness (packet::number::tests::round_trip
) with the rust toolchain update in #2045.The text was updated successfully, but these errors were encountered: