File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -463,13 +463,6 @@ tstate_set_stack(PyThreadState *tstate,
463
463
// Sanity checks
464
464
assert (ts -> c_stack_hard_limit <= ts -> c_stack_soft_limit );
465
465
assert (ts -> c_stack_soft_limit < ts -> c_stack_top );
466
-
467
- // Test the stack pointer
468
- #if !defined(NDEBUG ) && !defined(__wasi__ )
469
- uintptr_t here_addr = _Py_get_machine_stack_pointer ();
470
- assert (ts -> c_stack_soft_limit < here_addr );
471
- assert (here_addr < ts -> c_stack_top );
472
- #endif
473
466
}
474
467
475
468
@@ -556,6 +549,13 @@ PyUnstable_ThreadState_ResetStack(PyThreadState *tstate)
556
549
tstate_set_stack (tstate , (void * )start , size );
557
550
ts -> c_stack_init_start = start ;
558
551
ts -> c_stack_init_size = size ;
552
+
553
+ // Test the stack pointer
554
+ #if !defined(NDEBUG ) && !defined(__wasi__ )
555
+ uintptr_t here_addr = _Py_get_machine_stack_pointer ();
556
+ assert (ts -> c_stack_soft_limit < here_addr );
557
+ assert (here_addr < ts -> c_stack_top );
558
+ #endif
559
559
}
560
560
561
561
You can’t perform that action at this time.
0 commit comments