From e3b7c42ebb68582efc695acbd5d792075cbdc845 Mon Sep 17 00:00:00 2001 From: chenmiao_nsrc Date: Fri, 31 Mar 2023 23:16:06 +0800 Subject: [PATCH] midified atomic::ordering about FIRST_PANIC --- sgx_tstd/src/panicking.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sgx_tstd/src/panicking.rs b/sgx_tstd/src/panicking.rs index b6f55d89d..63adde871 100644 --- a/sgx_tstd/src/panicking.rs +++ b/sgx_tstd/src/panicking.rs @@ -285,7 +285,7 @@ fn default_hook(info: &PanicInfo<'_>) { drop(backtrace::print(err, crate::sys::backtrace::PrintFmt::Full)) } Some(BacktraceStyle::Off) => { - if FIRST_PANIC.swap(false, Ordering::SeqCst) { + if FIRST_PANIC.swap(false, Ordering::Relaxed) { let _ = writeln!( err, "note: call backtrace::enable_backtrace with 'PrintFormat::Short/Full' for a backtrace."