if (secs == 0)
/* If elapsed time is exactly zero, it means we're under the
resolution of the timer. This can easily happen on systems
that use time() for the timer. Since the interval lies between
0 and the timer's resolution, assume half the resolution. */
secs = ptimer_resolution () / 2.0;
secs is a double. If because of timer issues it's tiny, you can get very large numbers. In me trying to reproduce it, I saw GB/s speeds all the time that were theoretically impossible.
I started getting crashes on various Ubuntu 22.04 servers. There may have been a change somewhere that exposes it, but the problem was always there.
The code also says:
if (secs == 0)
/* If elapsed time is exactly zero, it means we're under the
resolution of the timer. This can easily happen on systems
that use time() for the timer. Since the interval lies between
0 and the timer's resolution, assume half the resolution. */
secs = ptimer_resolution () / 2.0;
secs is a double. If because of timer issues it's tiny, you can get very large numbers. In me trying to reproduce it, I saw GB/s speeds all the time that were theoretically impossible.
I started getting crashes on various Ubuntu 22.04 servers. There may have been a change somewhere that exposes it, but the problem was always there.