Skip to content

Commit 433a18f

Browse files
committed
gthr_aux: Reuse saved_once in non-volatile register
1 parent 6f6b4fa commit 433a18f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

mcfgthread/gthr_aux.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ __MCF_gthr_call_once_seh_take_over(_MCF_once* once, __MCF_cxa_dtor_any_ init_pro
2121
{
2222
#ifdef __MCF_M_X8632
2323
__MCF_USING_SEH_HANDLER(do_call_once_seh_unwind, (DWORD) once);
24+
_MCF_once* saved_once = once;
2425
# define do_seh_once_reg(frm, disp) (((DWORD**) (frm))[2])
2526
#else
2627
__MCF_USING_SEH_HANDLER(do_call_once_seh_unwind);
@@ -41,7 +42,7 @@ __MCF_gthr_call_once_seh_take_over(_MCF_once* once, __MCF_cxa_dtor_any_ init_pro
4142
__MCF_invoke_cxa_dtor(init_proc, arg);
4243

4344
/* Disarm the once flag with a tail call. */
44-
_MCF_once_release(once);
45+
_MCF_once_release(saved_once);
4546
}
4647

4748
static

0 commit comments

Comments
 (0)