From 6465fef99296acc5f114de3c3e12543e86fa6b05 Mon Sep 17 00:00:00 2001 From: Cameron Bytheway Date: Sat, 8 Jun 2024 14:07:45 -0600 Subject: [PATCH] revert kani slice size change (#228) --- lib/bolero-kani/Cargo.toml | 2 +- lib/bolero-kani/src/lib.rs | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/bolero-kani/Cargo.toml b/lib/bolero-kani/Cargo.toml index b3ec076..fdc635a 100644 --- a/lib/bolero-kani/Cargo.toml +++ b/lib/bolero-kani/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bolero-kani" -version = "0.11.0" +version = "0.11.1" authors = ["Cameron Bytheway "] description = "kani plugin for bolero" homepage = "https://github.com/camshaft/bolero" diff --git a/lib/bolero-kani/src/lib.rs b/lib/bolero-kani/src/lib.rs index 9f768ee..a735cc6 100644 --- a/lib/bolero-kani/src/lib.rs +++ b/lib/bolero-kani/src/lib.rs @@ -76,16 +76,13 @@ pub mod lib { fn with_slice Output>(&mut self, f: &mut F) -> Output { // TODO make this configurable - const MAX_LEN: usize = driver::Options::DEFAULT_MAX_LEN; + const MAX_LEN: usize = 256; let bytes = kani::vec::any_vec::(); let len = self.options.max_len_or_default().min(MAX_LEN); kani::assume(bytes.len() <= len); - let array: [u8; MAX_LEN] = kani::any(); - let len = kani::any(); - kani::assume(len <= MAX_LEN); - f(&array[..len]) + f(&bytes) } fn with_driver Output>(&mut self, f: &mut F) -> Output {