Skip to content

Commit e5515d6

Browse files
change unwind to solver(cvc5)
1 parent b701f3a commit e5515d6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

library/core/src/ffi/c_str.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ mod verify {
891891

892892
// pub const fn from_bytes_until_nul(bytes: &[u8]) -> Result<&CStr, FromBytesUntilNulError>
893893
#[kani::proof]
894-
#[kani::unwind(32)] // 7.3 seconds when 16; 33.1 seconds when 32
894+
#[kani::solver(cvc5)] // 7.3 seconds when 16; 33.1 seconds when 32
895895
fn check_from_bytes_until_nul() {
896896
const MAX_SIZE: usize = 32;
897897
let string: [u8; MAX_SIZE] = kani::any();
@@ -907,7 +907,7 @@ mod verify {
907907

908908
// pub const unsafe fn from_bytes_with_nul_unchecked(bytes: &[u8]) -> &CStr
909909
#[kani::proof_for_contract(CStr::from_bytes_with_nul_unchecked)]
910-
#[kani::unwind(33)]
910+
#[kani::solver(cvc5)]
911911
fn check_from_bytes_with_nul_unchecked() {
912912
const MAX_SIZE: usize = 32;
913913
let string: [u8; MAX_SIZE] = kani::any();
@@ -926,7 +926,7 @@ mod verify {
926926

927927
// pub fn bytes(&self) -> Bytes<'_>
928928
#[kani::proof]
929-
#[kani::unwind(32)]
929+
#[kani::solver(cvc5)]
930930
fn check_bytes() {
931931
const MAX_SIZE: usize = 32;
932932
let string: [u8; MAX_SIZE] = kani::any();
@@ -944,7 +944,7 @@ mod verify {
944944

945945
// pub const fn to_str(&self) -> Result<&str, str::Utf8Error>
946946
#[kani::proof]
947-
#[kani::unwind(32)]
947+
#[kani::solver(cvc5)]
948948
fn check_to_str() {
949949
const MAX_SIZE: usize = 32;
950950
let string: [u8; MAX_SIZE] = kani::any();
@@ -988,7 +988,7 @@ mod verify {
988988

989989
// pub const fn from_bytes_with_nul(bytes: &[u8]) -> Result<&Self, FromBytesWithNulError>
990990
#[kani::proof]
991-
#[kani::unwind(17)]
991+
#[kani::solver(cvc5)]
992992
fn check_from_bytes_with_nul() {
993993
const MAX_SIZE: usize = 16;
994994
let string: [u8; MAX_SIZE] = kani::any();
@@ -1027,7 +1027,7 @@ mod verify {
10271027

10281028
// pub const fn to_bytes(&self) -> &[u8]
10291029
#[kani::proof]
1030-
#[kani::unwind(32)]
1030+
#[kani::solver(cvc5)]
10311031
fn check_to_bytes() {
10321032
const MAX_SIZE: usize = 32;
10331033
let string: [u8; MAX_SIZE] = kani::any();
@@ -1072,7 +1072,7 @@ mod verify {
10721072

10731073
// pub const unsafe fn from_ptr<'a>(ptr: *const c_char) -> &'a CStr
10741074
#[kani::proof_for_contract(CStr::from_ptr)]
1075-
#[kani::unwind(33)]
1075+
#[kani::solver(cvc5)]
10761076
fn check_from_ptr_contract() {
10771077
const MAX_SIZE: usize = 32;
10781078
let string: [u8; MAX_SIZE] = kani::any();
@@ -1085,7 +1085,7 @@ mod verify {
10851085

10861086
// pub const fn is_empty(&self) -> bool
10871087
#[kani::proof]
1088-
#[kani::unwind(33)]
1088+
#[kani::solver(cvc5)]
10891089
fn check_is_empty() {
10901090
const MAX_SIZE: usize = 32;
10911091
let string: [u8; MAX_SIZE] = kani::any();

0 commit comments

Comments
 (0)