about summary refs log tree commit diff
path: root/library/panic_unwind/src
diff options
context:
space:
mode:
authorMara Bos <m-ou.se@m-ou.se>2024-03-19 14:56:48 +0100
committerMara Bos <m-ou.se@m-ou.se>2024-03-19 15:27:11 +0100
commit5e4cc6f69475320b6d917ff4a54a063401d17f5b (patch)
tree607a035795f8064d743a59e419338e00c625deb7 /library/panic_unwind/src
parenta2c74b8445001b7f6cfd1e333b29f21637ab2282 (diff)
downloadrust-5e4cc6f69475320b6d917ff4a54a063401d17f5b.tar.gz
rust-5e4cc6f69475320b6d917ff4a54a063401d17f5b.zip
SeqCst->Relaxed in panic_unwind/emcc.
SeqCst is unnecessary here.
Diffstat (limited to 'library/panic_unwind/src')
-rw-r--r--library/panic_unwind/src/emcc.rs2
1 files changed, 1 insertions, 1 deletions
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 @@ pub unsafe fn cleanup(ptr: *mut u8) -> Box<dyn Any + Send> {
         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();