Skip to content

Commit bca0997

Browse files
unix: NEED_ALTSTACK must sync with PAGE_SIZE
Co-authored-by: Jonas Böttiger <[email protected]>
1 parent 72a6bbf commit bca0997

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library/std/src/sys/pal/unix/stack_overflow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ mod imp {
142142
if action.sa_sigaction == SIG_DFL {
143143
if !NEED_ALTSTACK.load(Ordering::Relaxed) {
144144
// haven't set up our sigaltstack yet
145-
NEED_ALTSTACK.store(true, Ordering::Relaxed);
145+
NEED_ALTSTACK.store(true, Ordering::Release);
146146
let handler = unsafe { make_handler(true) };
147147
MAIN_ALTSTACK.store(handler.data, Ordering::Relaxed);
148148
mem::forget(handler);

0 commit comments

Comments
 (0)