Skip to content

Commit

Permalink
SeqCst->Relaxed in panic_unwind/emcc.
Browse files Browse the repository at this point in the history
SeqCst is unnecessary here.
  • Loading branch information
m-ou-se committed Mar 19, 2024
1 parent a2c74b8 commit 5e4cc6f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library/panic_unwind/src/emcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 5e4cc6f

Please sign in to comment.