From 5e4cc6f69475320b6d917ff4a54a063401d17f5b Mon Sep 17 00:00:00 2001 From: Mara Bos Date: Tue, 19 Mar 2024 14:56:48 +0100 Subject: [PATCH] SeqCst->Relaxed in panic_unwind/emcc. SeqCst is unnecessary here. --- library/panic_unwind/src/emcc.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/panic_unwind/src/emcc.rs b/library/panic_unwind/src/emcc.rs index af18e19337c..fed4c52e83c 100644 --- a/library/panic_unwind/src/emcc.rs +++ b/library/panic_unwind/src/emcc.rs @@ -84,7 +84,7 @@ struct CatchData { super::__rust_foreign_exception(); } - let was_caught = (*adjusted_ptr).caught.swap(true, Ordering::SeqCst); + let was_caught = (*adjusted_ptr).caught.swap(true, Ordering::Relaxed); if was_caught { // Since cleanup() isn't allowed to panic, we just abort instead. intrinsics::abort();