This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author methane
Recipients methane, vstinner
Date 2017-01-18.10:10:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484734241.81.0.416772281293.issue29306@psf.upfronthosting.co.za>
In-reply-to
Content
I think basic idea is "wrap unknown function call at least once, and preferably only once".

_PyEval_EvalFrameDefault() calls Py_EnterRecursiveCall("").
So wrapping PyFunction_(Fast)Call* with Py_EnterRecursiveCall() seems redundant.

On the other hand, PyCFunction may calls method of extension module,
and it can cause recursive call.
So I think PyCFunction_*Call* methods calling function pointer it has
(e.g. _PyCFunction_FastCallKeywords) should call Py_EnterRecursiveCall().

And caller of them can skip Py_EnterRecursiveCall().
For example, _PyObject_FastCallDict() may call _PyFunction_FastCallDict() or
_PyCFunction_FastCallDict(), or tp_fastcall (via _Py_RawFastCallDict) or tp_call.
It can wrap all, but wrapping only tp_fastcall and tp_call is better.
History
Date User Action Args
2017-01-18 10:10:41methanesetrecipients: + methane, vstinner
2017-01-18 10:10:41methanesetmessageid: <1484734241.81.0.416772281293.issue29306@psf.upfronthosting.co.za>
2017-01-18 10:10:41methanelinkissue29306 messages
2017-01-18 10:10:41methanecreate