2022-07-08 11:08:32 -05:00
|
|
|
//@compile-flags: -Zmiri-disable-isolation
|
2020-10-17 14:36:05 -05:00
|
|
|
|
|
|
|
#![feature(backtrace)]
|
|
|
|
|
|
|
|
use std::backtrace::Backtrace;
|
|
|
|
|
2022-06-20 17:30:34 -05:00
|
|
|
#[inline(never)]
|
|
|
|
fn func_a() -> Backtrace {
|
|
|
|
func_b::<u8>()
|
|
|
|
}
|
|
|
|
#[inline(never)]
|
|
|
|
fn func_b<T>() -> Backtrace {
|
|
|
|
func_c()
|
|
|
|
}
|
2020-10-17 14:36:05 -05:00
|
|
|
|
|
|
|
macro_rules! invoke_func_d {
|
2022-06-20 17:30:34 -05:00
|
|
|
() => {
|
|
|
|
func_d()
|
|
|
|
};
|
2020-10-17 14:36:05 -05:00
|
|
|
}
|
|
|
|
|
2022-06-20 17:30:34 -05:00
|
|
|
#[inline(never)]
|
|
|
|
fn func_c() -> Backtrace {
|
|
|
|
invoke_func_d!()
|
|
|
|
}
|
|
|
|
#[inline(never)]
|
|
|
|
fn func_d() -> Backtrace {
|
|
|
|
Backtrace::capture()
|
|
|
|
}
|
2020-10-17 14:36:05 -05:00
|
|
|
|
|
|
|
fn main() {
|
|
|
|
eprint!("{}", func_a());
|
|
|
|
}
|