Skip to content

Commit

Permalink
Partially integrate uninit memory checks into verify_std (#3470)
Browse files Browse the repository at this point in the history
This PR partially integrates uninitialized memory checks into the
`verify_std` pipeline, which makes it possible to enable them for the
Rust Standard Library verification.

Changes:
- Move `mem_init.rs` library code into `kani_core`.
- Add a conditional compilation flag to disable uninitialized memory
checks whenever some functionality is not yet supported.

By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 and MIT licenses.
  • Loading branch information
artemagvanian authored Aug 31, 2024
1 parent 01a00b0 commit 2960f80
Show file tree
Hide file tree
Showing 7 changed files with 377 additions and 334 deletions.
1 change: 0 additions & 1 deletion library/kani/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pub mod shadow;
pub mod slice;
pub mod vec;

mod mem_init;
mod models;

#[cfg(feature = "concrete_playback")]
Expand Down
333 changes: 0 additions & 333 deletions library/kani/src/mem_init.rs

This file was deleted.

9 changes: 9 additions & 0 deletions library/kani_core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

mod arbitrary;
mod mem;
mod mem_init;

pub use kani_macros::*;

Expand All @@ -45,6 +46,10 @@ macro_rules! kani_lib {
pub mod mem {
kani_core::kani_mem!(core);
}

mod mem_init {
kani_core::kani_mem_init!(core);
}
}
};

Expand All @@ -56,6 +61,10 @@ macro_rules! kani_lib {
pub mod mem {
kani_core::kani_mem!(std);
}

mod mem_init {
kani_core::kani_mem_init!(std);
}
};
}

Expand Down
Loading

0 comments on commit 2960f80

Please sign in to comment.