Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
If :c:func:`PySys_Audit` fails in :c:func:`PyEval_SetProfile` or
:c:func:`PyEval_SetTrace`, log the error as an unraisable exception.
2 changes: 2 additions & 0 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -4686,6 +4686,7 @@ void
PyEval_SetProfile(Py_tracefunc func, PyObject *arg)
{
if (PySys_Audit("sys.setprofile", NULL) < 0) {
_PyErr_WriteUnraisableMsg("in PyEval_SetProfile", NULL);
return;
}

Expand All @@ -4707,6 +4708,7 @@ void
PyEval_SetTrace(Py_tracefunc func, PyObject *arg)
{
if (PySys_Audit("sys.settrace", NULL) < 0) {
_PyErr_WriteUnraisableMsg("in PyEval_SetTrace", NULL);
return;
}

Expand Down