@@ -2448,7 +2448,8 @@ module_get_gc_hooks(PyObject *self, PyObject *arg)
24482448
24492449
24502450static void
2451- check_threadstate_set_stack (PyThreadState * tstate , void * start , size_t size )
2451+ check_threadstate_set_stack_protection (PyThreadState * tstate ,
2452+ void * start , size_t size )
24522453{
24532454 assert (PyUnstable_ThreadState_SetStackProtection (tstate , start , size ) == 0 );
24542455 assert (!PyErr_Occurred ());
@@ -2461,7 +2462,7 @@ check_threadstate_set_stack(PyThreadState *tstate, void *start, size_t size)
24612462
24622463
24632464static PyObject *
2464- test_threadstate_set_stack (PyObject * self , PyObject * Py_UNUSED (args ))
2465+ test_threadstate_set_stack_protection (PyObject * self , PyObject * Py_UNUSED (args ))
24652466{
24662467 PyThreadState * tstate = PyThreadState_GET ();
24672468 _PyThreadStateImpl * ts = (_PyThreadStateImpl * )tstate ;
@@ -2473,13 +2474,13 @@ test_threadstate_set_stack(PyObject *self, PyObject *Py_UNUSED(args))
24732474 // Test the minimum stack size
24742475 size_t size = _PyOS_MIN_STACK_SIZE ;
24752476 void * start = (void * )(_Py_get_machine_stack_pointer () - size );
2476- check_threadstate_set_stack (tstate , start , size );
2477+ check_threadstate_set_stack_protection (tstate , start , size );
24772478
24782479 // Test a larger size
24792480 size = 7654321 ;
24802481 assert (size > _PyOS_MIN_STACK_SIZE );
24812482 start = (void * )(_Py_get_machine_stack_pointer () - size );
2482- check_threadstate_set_stack (tstate , start , size );
2483+ check_threadstate_set_stack_protection (tstate , start , size );
24832484
24842485 // Test invalid size (too small)
24852486 size = 5 ;
@@ -2607,7 +2608,8 @@ static PyMethodDef module_functions[] = {
26072608 {"simple_pending_call ", simple_pending_call , METH_O },
26082609 {"set_vectorcall_nop ", set_vectorcall_nop , METH_O },
26092610 {"module_get_gc_hooks ", module_get_gc_hooks , METH_O },
2610- {"test_threadstate_set_stack ", test_threadstate_set_stack , METH_NOARGS },
2611+ {"test_threadstate_set_stack_protection ",
2612+ test_threadstate_set_stack_protection , METH_NOARGS },
26112613 {NULL, NULL } /* sentinel */
26122614};
26132615
0 commit comments