Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
zhassan-aws committed May 28, 2024
1 parent a93c7ea commit 078217e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions library/kani/src/shadow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ impl ShadowMem {
}

/// # Safety
///
///
/// `ptr` must be valid
pub unsafe fn is_init(&self, ptr: *const u8) -> bool {
unsafe { read(&self.is_init, ptr) }
}

/// # Safety
///
///
/// `ptr` must be valid
pub unsafe fn set_init(&mut self, ptr: *const u8, init: bool) {
unsafe { write(&mut self.is_init, ptr, init) };
}
}

/// # Safety
///
///
/// `ptr` must be valid
pub unsafe fn read(sm: &[[bool; 64]; 1024], ptr: *const u8) -> bool {
let obj = unsafe { __KANI_pointer_object(ptr) };
Expand All @@ -40,7 +40,7 @@ pub unsafe fn read(sm: &[[bool; 64]; 1024], ptr: *const u8) -> bool {
}

/// # Safety
///
///
/// `ptr` must be valid
pub unsafe fn write(sm: &mut [[bool; 64]; 1024], ptr: *const u8, val: bool) {
let obj = unsafe { __KANI_pointer_object(ptr) };
Expand Down

0 comments on commit 078217e

Please sign in to comment.