-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Closed
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
There are several issues in this function:
- Our traditional case, when all errors are overwritten in a sequence preparation:
Lines 9584 to 9609 in d2f1b0e
PyStructSequence_SET_ITEM(result, 0, PyFloat_FromDouble(doubletime(ru->ru_utime))); PyStructSequence_SET_ITEM(result, 1, PyFloat_FromDouble(doubletime(ru->ru_stime))); #define SET_INT(result, index, value)\ PyStructSequence_SET_ITEM(result, index, PyLong_FromLong(value)) SET_INT(result, 2, ru->ru_maxrss); SET_INT(result, 3, ru->ru_ixrss); SET_INT(result, 4, ru->ru_idrss); SET_INT(result, 5, ru->ru_isrss); SET_INT(result, 6, ru->ru_minflt); SET_INT(result, 7, ru->ru_majflt); SET_INT(result, 8, ru->ru_nswap); SET_INT(result, 9, ru->ru_inblock); SET_INT(result, 10, ru->ru_oublock); SET_INT(result, 11, ru->ru_msgsnd); SET_INT(result, 12, ru->ru_msgrcv); SET_INT(result, 13, ru->ru_nsignals); SET_INT(result, 14, ru->ru_nvcsw); SET_INT(result, 15, ru->ru_nivcsw); #undef SET_INT if (PyErr_Occurred()) { Py_DECREF(result); return NULL; } PyLong_FromPid
can returnNULL
, but this case is ignoredLine 9611 in d2f1b0e
return Py_BuildValue("NiN", PyLong_FromPid(pid), status, result);
I have a PR ready.
Linked PRs
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error