Skip to content

Commit 5965cf5

Browse files
authored
use noop backends on Miri (#360)
1 parent 8f89434 commit 5965cf5

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/backtrace/mod.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,11 @@ impl fmt::Debug for Frame {
121121
}
122122

123123
cfg_if::cfg_if! {
124-
if #[cfg(
124+
if #[cfg(miri)] {
125+
mod noop;
126+
use self::noop::trace as trace_imp;
127+
pub(crate) use self::noop::Frame as FrameImp;
128+
} else if #[cfg(
125129
any(
126130
all(
127131
unix,

src/symbolize/mod.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,13 @@ pub fn clear_symbol_cache() {
456456
}
457457

458458
cfg_if::cfg_if! {
459-
if #[cfg(all(windows, target_env = "msvc", not(target_vendor = "uwp")))] {
459+
if #[cfg(miri)] {
460+
mod noop;
461+
use self::noop::resolve as resolve_imp;
462+
use self::noop::Symbol as SymbolImp;
463+
#[allow(unused)]
464+
unsafe fn clear_symbol_cache_imp() {}
465+
} else if #[cfg(all(windows, target_env = "msvc", not(target_vendor = "uwp")))] {
460466
mod dbghelp;
461467
use self::dbghelp::resolve as resolve_imp;
462468
use self::dbghelp::Symbol as SymbolImp;

0 commit comments

Comments
 (0)