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,
463463 // Sanity checks
464464 assert (ts -> c_stack_hard_limit <= ts -> c_stack_soft_limit );
465465 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
473466}
474467
475468
@@ -556,6 +549,13 @@ PyUnstable_ThreadState_ResetStack(PyThreadState *tstate)
556549 tstate_set_stack (tstate , (void * )start , size );
557550 ts -> c_stack_init_start = start ;
558551 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
559559}
560560
561561
You can’t perform that action at this time.
0 commit comments