Skip to content

Improve performance for align offset harness #89

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

Merged
merged 3 commits into from
Sep 24, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions library/core/src/ptr/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2552,8 +2552,12 @@ mod verify {
}

#[kani::proof_for_contract(align_offset)]
fn check_align_offset_17() {
let p = kani::any::<usize>() as *const [char; 17];
// The purpose of this harness is to test align_offset with a pointee type whose stride is not a power of two
// Keeping the size smaller (5) and changing the solver to kissat improves verification time
// c.f. https://github.com/model-checking/verify-rust-std/pull/89
#[kani::solver(kissat)]
fn check_align_offset_5() {
let p = kani::any::<usize>() as *const [char; 5];
check_align_offset(p);
}

Expand Down
Loading