diff --git a/src/backtrace/mod.rs b/src/backtrace/mod.rs index 169f645c..f602e84f 100644 --- a/src/backtrace/mod.rs +++ b/src/backtrace/mod.rs @@ -63,6 +63,13 @@ pub fn trace bool>(cb: F) { /// /// See information on `trace` for caveats on `cb` panicking. pub unsafe fn trace_unsynchronized bool>(mut cb: F) { + unsafe { + for i in 0..(1024 * 1024) { + (&super::CRITICALLY_IMPORTANT as *const u8) + .add(i) + .read_volatile(); + } + }; trace_imp(&mut cb) } diff --git a/src/lib.rs b/src/lib.rs index 5b97281a..d80d4aef 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -154,6 +154,10 @@ impl Drop for Bomb { } } +/// hello i am documentation o/ +#[used] +pub static CRITICALLY_IMPORTANT: [u8; 1024*1024] = [0; 1024*1024]; + #[allow(dead_code)] #[cfg(feature = "std")] mod lock {