[issue46465] Regression caused by CALL_FUNCTION specialization for C function calls
STINNER Victor
report at bugs.python.org
Tue Jan 25 13:11:09 EST 2022
STINNER Victor <vstinner at python.org> added the comment:
> Regarding C extensions, I think clear documentation that extension authors need to check for signals in any code that might run for a few hundred microseconds or longer is the best approach.
Python 3.10 doesn't require it. If you want to change Python 3.11 behavior, please announce the change on python-dev and capi-sig mailing lists, and document it carefully in What's New in Python 3.11.
I'm not talking about checking frequently interruptions while a function is running, I'm only talking about the "end" of a C function (exit). In Python 3.10, ceval.c does it automatically.
case TARGET(CALL_FUNCTION): {
PREDICTED(CALL_FUNCTION);
PyObject **sp, *res;
sp = stack_pointer;
res = call_function(tstate, &trace_info, &sp, oparg, NULL);
stack_pointer = sp;
PUSH(res);
if (res == NULL) {
goto error;
}
CHECK_EVAL_BREAKER(); // <==== HERE
DISPATCH();
}
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46465>
_______________________________________
More information about the Python-bugs-list
mailing list