Skip to content

Commit

Permalink
Merge branch 'main' into kk-exec-viz
Browse files Browse the repository at this point in the history
  • Loading branch information
karkhaz committed Jun 21, 2023
2 parents b9792ec + 43bc890 commit cf52679
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
fixed::VecDeque::<u8>::handle_capacity_increase.assertion.7\
fixed::VecDeque::<u8>::handle_capacity_increase.assertion\
Status: UNREACHABLE\
Description: "assertion failed: self.head < self.tail"

fixed::VecDeque::<u8>::handle_capacity_increase.assertion.8\
fixed::VecDeque::<u8>::handle_capacity_increase.assertion\
Status: UNREACHABLE\
Description: "assertion failed: self.head < self.cap()"

fixed::VecDeque::<u8>::handle_capacity_increase.assertion.9\
fixed::VecDeque::<u8>::handle_capacity_increase.assertion\
Status: UNREACHABLE\
Description: "assertion failed: self.tail < self.cap()"

fixed::VecDeque::<u8>::handle_capacity_increase.assertion.10\
fixed::VecDeque::<u8>::handle_capacity_increase.assertion\
Status: UNREACHABLE\
Description: "assertion failed: self.cap().count_ones() == 1"

Expand Down
12 changes: 4 additions & 8 deletions tests/expected/object-bits/insufficient/main.rs
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
// Copyright Kani Contributors
// SPDX-License-Identifier: Apache-2.0 OR MIT

// Checks for error message with an --object-bits value that is too small

// kani-flags: --default-unwind 30 --enable-unstable --cbmc-args --object-bits 5
//! Checks for error message with an --object-bits value that is too small
//! Use linked list to ensure that each member represents a new object.

#[kani::proof]
fn main() {
let mut arr: [i32; 100] = kani::Arbitrary::any_array();
for i in 0..30 {
arr[i] = kani::any();
}
assert!(arr[0] > arr[0] - arr[99]);
let arr: [i32; 18] = kani::Arbitrary::any_array();
std::hint::black_box(std::collections::LinkedList::from(arr));
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/add_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
fn main() {
let a: i32 = kani::any();
let b: i32 = kani::any();
unsafe { std::intrinsics::unchecked_add(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_add(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/div_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
fn main() {
let a: i32 = i32::MIN;
let b: i32 = -1;
unsafe { std::intrinsics::unchecked_div(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_div(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/div_zero_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
fn main() {
let a: i32 = kani::any();
let b: i32 = 0;
unsafe { std::intrinsics::unchecked_div(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_div(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/mul_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
fn main() {
let a: i32 = kani::any();
let b: i32 = kani::any();
unsafe { std::intrinsics::unchecked_mul(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_mul(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/rem_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
fn main() {
let a: i32 = i32::MIN;
let b: i32 = -1;
unsafe { std::intrinsics::unchecked_rem(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_rem(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/rem_zero_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@
fn main() {
let a: i32 = kani::any();
let b: i32 = 0;
unsafe { std::intrinsics::unchecked_rem(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_rem(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/shl_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
fn main() {
let a: u32 = kani::any();
let b: u32 = kani::any();
unsafe { std::intrinsics::unchecked_shl(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_shl(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/shr_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
fn main() {
let a: u32 = kani::any();
let b: u32 = kani::any();
unsafe { std::intrinsics::unchecked_shr(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_shr(a, b) });
}
3 changes: 2 additions & 1 deletion tests/kani/Intrinsics/Math/Arith/Unchecked/sub_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@
fn main() {
let a: i32 = kani::any();
let b: i32 = kani::any();
unsafe { std::intrinsics::unchecked_sub(a, b) };
// Black box this so it doesn't get pruned by the compiler.
std::hint::black_box(unsafe { std::intrinsics::unchecked_sub(a, b) });
}
2 changes: 1 addition & 1 deletion tests/ui/should-panic-attribute/expected-panics/expected
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
** 2 of 2 failed\
** 2 of 2 failed
Failed Checks: panicked on the `if` branch!
Failed Checks: panicked on the `else` branch!
VERIFICATION:- SUCCESSFUL (encountered one or more panics as expected)

0 comments on commit cf52679

Please sign in to comment.