Message395777
I suggest to remove the (now <= 0) check.
_PyTime_t now = _PyTime_GetPerfCounter();
if (now <= 0) {
Py_FatalError("_PyTime_GetPerfCounter() == 0");
}
Please don't add such Py_FatalError() in the middle of a function. If this case happens, it means that Python immediately exits and creates a debug report (ex: coredump on Unix, popup on Windows asking to open a debugger), and worse: it exits the process immediately.
I'm not aware of anyone reporting that _PyTime_GetPerfCounter() returns 0. Do you fear that the clock is broken and *always* report 0? If yes, please add at check when Python starts. But why do you think that it could happen? |
|
| Date |
User |
Action |
Args |
| 2021-06-14 07:14:25 | vstinner | set | recipients:
+ vstinner, paul.moore, pitrou, tim.golden, ned.deily, zach.ware, eryksun, steve.dower, miss-islington, Dennis Sweeney, SD, lunixbochs2 |
| 2021-06-14 07:14:25 | vstinner | set | messageid: <1623654865.02.0.824685644595.issue41299@roundup.psfhosted.org> |
| 2021-06-14 07:14:25 | vstinner | link | issue41299 messages |
| 2021-06-14 07:14:24 | vstinner | create | |
|